mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
4
node_modules/forwarded/HISTORY.md
generated
vendored
Normal file
4
node_modules/forwarded/HISTORY.md
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
0.1.0 / 2014-09-21
|
||||
==================
|
||||
|
||||
* Initial release
|
||||
22
node_modules/forwarded/LICENSE
generated
vendored
Normal file
22
node_modules/forwarded/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Douglas Christopher Wilson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
53
node_modules/forwarded/README.md
generated
vendored
Normal file
53
node_modules/forwarded/README.md
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# forwarded
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Parse HTTP X-Forwarded-For header
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ npm install forwarded
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var forwarded = require('forwarded')
|
||||
```
|
||||
|
||||
### forwarded(req)
|
||||
|
||||
```js
|
||||
var addresses = forwarded(req)
|
||||
```
|
||||
|
||||
Parse the `X-Forwarded-For` header from the request. Returns an array
|
||||
of the addresses, including the socket address for the `req`. In reverse
|
||||
order (i.e. index `0` is the socket address and the last index is the
|
||||
furthest address, typically the end-user).
|
||||
|
||||
## Testing
|
||||
|
||||
```sh
|
||||
$ npm test
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/forwarded.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/forwarded
|
||||
[node-version-image]: https://img.shields.io/node/v/forwarded.svg?style=flat
|
||||
[node-version-url]: http://nodejs.org/download/
|
||||
[travis-image]: https://img.shields.io/travis/jshttp/forwarded.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/jshttp/forwarded
|
||||
[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master
|
||||
[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/forwarded
|
||||
35
node_modules/forwarded/index.js
generated
vendored
Normal file
35
node_modules/forwarded/index.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*!
|
||||
* forwarded
|
||||
* Copyright(c) 2014 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = forwarded
|
||||
|
||||
/**
|
||||
* Get all addresses in the request, using the `X-Forwarded-For` header.
|
||||
*
|
||||
* @param {Object} req
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function forwarded(req) {
|
||||
if (!req) {
|
||||
throw new TypeError('argument req is required')
|
||||
}
|
||||
|
||||
// simple header parsing
|
||||
var proxyAddrs = (req.headers['x-forwarded-for'] || '')
|
||||
.split(/ *, */)
|
||||
.filter(Boolean)
|
||||
.reverse()
|
||||
var socketAddr = req.connection.remoteAddress
|
||||
var addrs = [socketAddr].concat(proxyAddrs)
|
||||
|
||||
// return all addresses
|
||||
return addrs
|
||||
}
|
||||
91
node_modules/forwarded/package.json
generated
vendored
Normal file
91
node_modules/forwarded/package.json
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"forwarded@~0.1.0",
|
||||
"/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/proxy-addr"
|
||||
]
|
||||
],
|
||||
"_from": "forwarded@>=0.1.0 <0.2.0",
|
||||
"_id": "forwarded@0.1.0",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/forwarded",
|
||||
"_npmUser": {
|
||||
"email": "doug@somethingdoug.com",
|
||||
"name": "dougwilson"
|
||||
},
|
||||
"_npmVersion": "1.4.21",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "forwarded",
|
||||
"raw": "forwarded@~0.1.0",
|
||||
"rawSpec": "~0.1.0",
|
||||
"scope": null,
|
||||
"spec": ">=0.1.0 <0.2.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/proxy-addr"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz",
|
||||
"_shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "forwarded@~0.1.0",
|
||||
"_where": "/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/proxy-addr",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jshttp/forwarded/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Douglas Christopher Wilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "Parse HTTP X-Forwarded-For header",
|
||||
"devDependencies": {
|
||||
"istanbul": "0.3.2",
|
||||
"mocha": "~1.21.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "19ef9874c4ae1c297bcf078fde63a09b66a84363",
|
||||
"tarball": "http://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
},
|
||||
"files": [
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "e9a9faeb3cfaadf40eb57d144fff26bca9b818e8",
|
||||
"homepage": "https://github.com/jshttp/forwarded",
|
||||
"keywords": [
|
||||
"http",
|
||||
"req",
|
||||
"x-forwarded-for"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "dougwilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
}
|
||||
],
|
||||
"name": "forwarded",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jshttp/forwarded.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec --bail --check-leaks test/",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
||||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
||||
},
|
||||
"version": "0.1.0"
|
||||
}
|
||||
Reference in New Issue
Block a user