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]
9 Parse HTTP X-Forwarded-For header
13 This is a [Node.js](https://nodejs.org/en/) module available through the
14 [npm registry](https://www.npmjs.com/). Installation is done using the
15 [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
18 $ npm install forwarded
24 var forwarded = require('forwarded')
30 var addresses = forwarded(req)
33 Parse the `X-Forwarded-For` header from the request. Returns an array
34 of the addresses, including the socket address for the `req`, in reverse
35 order (i.e. index `0` is the socket address and the last index is the
36 furthest address, typically the end-user).
48 [npm-image]: https://img.shields.io/npm/v/forwarded.svg
49 [npm-url]: https://npmjs.org/package/forwarded
50 [node-version-image]: https://img.shields.io/node/v/forwarded.svg
51 [node-version-url]: https://nodejs.org/en/download/
52 [travis-image]: https://img.shields.io/travis/jshttp/forwarded/master.svg
53 [travis-url]: https://travis-ci.org/jshttp/forwarded
54 [coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded/master.svg
55 [coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master
56 [downloads-image]: https://img.shields.io/npm/dm/forwarded.svg
57 [downloads-url]: https://npmjs.org/package/forwarded