{"_id":"@fastify/forwarded","_rev":"4091798","name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","dist-tags":{"latest":"3.0.1"},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"time":{"modified":"2025-12-02T22:23:40.000Z","created":"2021-02-12T17:16:52.007Z","3.0.1":"2025-09-28T15:12:32.937Z","3.0.0":"2024-07-13T11:01:16.594Z","2.2.0":"2022-12-05T00:18:16.640Z","2.1.0":"2022-07-07T11:00:43.819Z","2.0.0":"2022-05-25T09:03:58.596Z","1.0.0":"2021-02-12T17:17:25.784Z","0.1.2":"2021-02-12T17:16:52.007Z"},"users":{},"author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"versions":{"3.0.1":{"name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","version":"3.0.1","type":"commonjs","author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"James Sumners","url":"https://james.sumners.info"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"name":"Frazer Smith","email":"frazer.dev@icloud.com","url":"https://github.com/fdawgs"}],"license":"MIT","keywords":["x-forwarded-for","http","req"],"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"bugs":{"url":"https://github.com/fastify/forwarded/issues"},"homepage":"https://github.com/fastify/forwarded#readme","funding":[{"type":"github","url":"https://github.com/sponsors/fastify"},{"type":"opencollective","url":"https://opencollective.com/fastify"}],"devDependencies":{"@types/node":"^24.0.8","benchmark":"2.1.4","c8":"^10.1.2","eslint":"^9.17.0","neostandard":"^0.12.0","tsd":"^0.33.0"},"types":"types/index.d.ts","scripts":{"bench":"node benchmark/index.js","bench:combined":"node benchmark/combined.js","lint":"eslint","lint:fix":"eslint --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"c8 --100 node --test","test:typescript":"tsd"},"_id":"@fastify/forwarded@3.0.1","gitHead":"45a4a5071c6758dbe24e052559ec69c2d9024a80","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"shasum":"9662b7bd4a59f6d123cc3487494f75f635c32d23","size":2563,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@fastify/forwarded/download/@fastify/forwarded-3.0.1.tgz"},"_npmUser":{"name":"eomm","email":"behemoth89@gmail.com"},"directories":{},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/forwarded_3.0.1_1759072352770_0.01018604859172556"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-28T15:12:32.937Z","publish_time":1759072352937,"_source_registry_name":"default","_cnpm_publish_time":1759072352937},"3.0.0":{"name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","version":"3.0.0","type":"commonjs","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Aras Abbasi"}],"license":"MIT","keywords":["x-forwarded-for","http","req"],"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"bugs":{"url":"https://github.com/fastify/forwarded/issues"},"homepage":"https://github.com/fastify/forwarded#readme","devDependencies":{"@types/node":"^20.14.9","benchmark":"2.1.4","standard":"^17.1.0","tap":"^18.8.0","tsd":"^0.31.1"},"types":"types/index.d.ts","scripts":{"bench":"node benchmark/index.js","bench:combined":"node benchmark/combined.js","lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"_id":"@fastify/forwarded@3.0.0","gitHead":"740af1addc86248c23a6e3274689a04e13488e58","_nodeVersion":"20.15.0","_npmVersion":"10.7.0","dist":{"shasum":"0fc96cdbbb5a38ad453d2d5533a34f09b4949b37","size":2364,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@fastify/forwarded/download/@fastify/forwarded-3.0.0.tgz"},"_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"directories":{},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forwarded_3.0.0_1720868476449_0.7777709463033355"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-13T11:01:16.594Z","publish_time":1720868476594,"_source_registry_name":"default","_cnpm_publish_time":1720868476594},"2.2.0":{"name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","version":"2.2.0","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Aras Abbasi"}],"license":"MIT","keywords":["x-forwarded-for","http","req"],"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"bugs":{"url":"https://github.com/fastify/forwarded/issues"},"homepage":"https://github.com/fastify/forwarded#readme","devDependencies":{"@types/node":"^18.0.3","benchmark":"2.1.4","standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.24.1"},"types":"types/index.d.ts","scripts":{"bench":"node benchmark/index.js","bench:combined":"node benchmark/combined.js","lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"gitHead":"8113bc73dc3442800c01d5cac9a8f0ce7cd70667","_id":"@fastify/forwarded@2.2.0","_nodeVersion":"16.17.0","_npmVersion":"9.1.2","dist":{"shasum":"17e26a8d110665be41607dd11effc94cd929ad00","size":2339,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@fastify/forwarded/download/@fastify/forwarded-2.2.0.tgz"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forwarded_2.2.0_1670199496387_0.6575630832020185"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-05T00:18:23.670Z","publish_time":1670199496640,"_cnpm_publish_time":1670199496640},"2.1.0":{"name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","version":"2.1.0","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Aras Abbasi"}],"license":"MIT","keywords":["x-forwarded-for","http","req"],"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"bugs":{"url":"https://github.com/fastify/forwarded/issues"},"homepage":"https://github.com/fastify/forwarded#readme","devDependencies":{"@types/node":"^18.0.3","benchmark":"2.1.4","standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.22.0"},"engines":{"node":">=14"},"types":"types/index.d.ts","scripts":{"bench":"node benchmark/index.js","bench:combined":"node benchmark/combined.js","lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"gitHead":"3ce389a304dd71c0c939bc9b8bbb4d1270b52d0c","_id":"@fastify/forwarded@2.1.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"shasum":"5bbcacc45d18f55d0a1fe289eb3dfda941da11f2","size":2293,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@fastify/forwarded/download/@fastify/forwarded-2.1.0.tgz"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forwarded_2.1.0_1657191643661_0.6575871490871328"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-07T11:32:47.790Z","publish_time":1657191643819,"_cnpm_publish_time":1657191643819},"2.0.0":{"name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","version":"2.0.0","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"license":"MIT","keywords":["x-forwarded-for","http","req"],"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"bugs":{"url":"https://github.com/fastify/forwarded/issues"},"homepage":"https://github.com/fastify/forwarded#readme","devDependencies":{"beautify-benchmark":"0.2.4","benchmark":"2.1.4","standard":"^17.0.0","tap":"^16.0.0"},"scripts":{"bench":"node benchmark/index.js","test":"standard && tap"},"gitHead":"cc656cb1cfea048eb1553728771deb66426f910c","_id":"@fastify/forwarded@2.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"shasum":"a2e2066f24e582dbf11342d56abd66c5458f1ebe","size":2138,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@fastify/forwarded/download/@fastify/forwarded-2.0.0.tgz"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forwarded_2.0.0_1653469438486_0.476370294375839"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-25T10:32:19.197Z","publish_time":1653469438596,"_cnpm_publish_time":1653469438596},"1.0.0":{"name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","version":"1.0.0","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"license":"MIT","keywords":["x-forwarded-for","http","req"],"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"devDependencies":{"beautify-benchmark":"0.2.4","benchmark":"2.1.4","standard":"^16.0.3","tap":"^14.11.0"},"engines":{"node":">= 10"},"scripts":{"bench":"node benchmark/index.js","test":"standard && tap"},"gitHead":"37fb391d0304d36a0a8ec0cc276a49d84e60cbfd","bugs":{"url":"https://github.com/fastify/forwarded/issues"},"homepage":"https://github.com/fastify/forwarded#readme","_id":"@fastify/forwarded@1.0.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"cc4a3bc1f02856e56e67d6d655026e8d8c2e7429","size":1996,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@fastify/forwarded/download/@fastify/forwarded-1.0.0.tgz"},"directories":{},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forwarded_1.0.0_1613150245689_0.8541590422732184"},"_hasShrinkwrap":false,"publish_time":1613150245784,"_cnpm_publish_time":1613150245784},"0.1.2":{"name":"@fastify/forwarded","description":"Parse HTTP X-Forwarded-For header","version":"0.1.2","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"}],"license":"MIT","keywords":["x-forwarded-for","http","req"],"repository":{"type":"git","url":"git+https://github.com/fastify/forwarded.git"},"devDependencies":{"beautify-benchmark":"0.2.4","benchmark":"2.1.4","standard":"^16.0.3","tap":"^14.11.0"},"engines":{"node":">= 10"},"scripts":{"bench":"node benchmark/index.js","test":"standard && tap"},"gitHead":"1cf50df57c711b060ebd9be9898c6172139203f4","bugs":{"url":"https://github.com/fastify/forwarded/issues"},"homepage":"https://github.com/fastify/forwarded#readme","_id":"@fastify/forwarded@0.1.2","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"174a6b5b0d432232ac45287c3919124141472013","size":1996,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@fastify/forwarded/download/@fastify/forwarded-0.1.2.tgz"},"directories":{},"maintainers":[{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"delvedor","email":""},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"matteo.collina","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forwarded_0.1.2_1613150211849_0.9321335133668562"},"_hasShrinkwrap":false,"publish_time":1613150212007,"_cnpm_publish_time":1613150212007}},"readme":"# @fastify/forwarded\n\n[![CI](https://github.com/fastify/forwarded/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/forwarded/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/@fastify/forwarded.svg?style=flat)](https://www.npmjs.com/package/@fastify/forwarded)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)\n\nParse HTTP X-Forwarded-For header.\n\nUpdated version of the great https://github.com/jshttp/forwarded.\nImplements https://github.com/jshttp/forwarded/pull/9.\n\n## Installation\n\n```sh\n$ npm i @fastify/forwarded\n```\n\n## API\n\n```js\nconst forwarded = require('@fastify/forwarded')\n```\n\n### forwarded(req)\n\n```js\nconst addresses = forwarded(req)\n```\n\nParse the `X-Forwarded-For` header from the request. Returns an array\nof the addresses, including the socket address for the `req`, in reverse\norder (i.e. index `0` is the socket address and the last index is the\nfurthest address, typically the end-user).\n\n## Testing\n\n```sh\n$ npm test\n```\n\n## License\n\n[MIT](LICENSE)\n","_attachments":{},"homepage":"https://github.com/fastify/forwarded#readme","bugs":{"url":"https://github.com/fastify/forwarded/issues"},"license":"MIT"}