arnaucube
arnaucube/socketioMEANseedPublic Self-hosted repository
socketioMEANseed/server/node_modules/forwarded/README.md
server/node_modules/forwarded/README.mdRaw
 1# forwarded
 2
 3[![NPM Version][npm-image]][npm-url]
 4[![NPM Downloads][downloads-image]][downloads-url]
 5[![Node.js Version][node-version-image]][node-version-url]
 6[![Build Status][travis-image]][travis-url]
 7[![Test Coverage][coveralls-image]][coveralls-url]
 8
 9Parse HTTP X-Forwarded-For header
10
11## Installation
12
13```sh
14$ npm install forwarded
15```
16
17## API
18
19```js
20var forwarded = require('forwarded')
21```
22
23### forwarded(req)
24
25```js
26var addresses = forwarded(req)
27```
28
29Parse the `X-Forwarded-For` header from the request. Returns an array
30of the addresses, including the socket address for the `req`. In reverse
31order (i.e. index `0` is the socket address and the last index is the
32furthest address, typically the end-user).
33
34## Testing
35
36```sh
37$ npm test
38```
39
40## License
41
42[MIT](LICENSE)
43
44[npm-image]: https://img.shields.io/npm/v/forwarded.svg?style=flat
45[npm-url]: https://npmjs.org/package/forwarded
46[node-version-image]: https://img.shields.io/node/v/forwarded.svg?style=flat
47[node-version-url]: http://nodejs.org/download/
48[travis-image]: https://img.shields.io/travis/jshttp/forwarded.svg?style=flat
49[travis-url]: https://travis-ci.org/jshttp/forwarded
50[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded.svg?style=flat
51[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master
52[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg?style=flat
53[downloads-url]: https://npmjs.org/package/forwarded