{"name":"@fastify/forwarded","version":"3.1.0","keywords":["x-forwarded-for","http","req"],"author":{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},"license":"MIT","_id":"@fastify/forwarded@3.1.0","maintainers":[{"name":"eomm","email":"behemoth89@gmail.com"}],"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"url":"https://james.sumners.info","name":"James Sumners"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"url":"https://github.com/fdawgs","name":"Frazer Smith","email":"frazer.dev@icloud.com"}],"homepage":"https://github.com/fastify/forwarded#readme","bugs":{"url":"https://github.com/fastify/forwarded/issues"},"dist":{"shasum":"834e6db45817e04ac7426bd73b7a9f57382d9b93","tarball":"http://registry-npm.ywwl.com/@fastify/forwarded/download/@fastify/forwarded-3.1.0.tgz","fileCount":5,"integrity":"sha512-TaHtoQxIEkzod6SPZNPh9hSUFk8sY0MK6f710XLFVL93OtbnfnLE6w5B11KbLu0wZJ5o5XKvl6+EhhgCazRWaQ==","signatures":[{"sig":"MEYCIQDOzYHaLJIMC6TXdJnZixW7vAC7DNn7zoDia/u2N8aIywIhAIz3zb73Zi3qP+NQPfEzI0Xzw159vKYV79FucNCAPUAz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIAzgoHP3exWaaRQiqT/4z9GXI3O+r+EM6eeHExkMaJhIAiEA3QL7b6nTTSHoZKLfdDLXKyWQnvzMu06wA/rmINmEkpw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@fastify%2fforwarded@3.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":5941,"size":2632,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-3.1.0.tgz"},"type":"commonjs","types":"types/index.d.ts","funding":[{"url":"https://github.com/sponsors/fastify","type":"github"},{"url":"https://opencollective.com/fastify","type":"opencollective"}],"gitHead":"7e6e64621be53a49934861fccb56be6cf30806b8","scripts":{"lint":"eslint","test":"npm run test:unit && npm run test:typescript","bench":"node benchmark/index.js","lint:fix":"eslint --fix","test:unit":"c8 --100 node --test","bench:combined":"node benchmark/combined.js","test:typescript":"tstyche"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"88e25ae8-8166-4b19-a9be-c7a2dd0786ea"}},"repository":{"url":"git+https://github.com/fastify/forwarded.git","type":"git"},"_npmVersion":"11.19.0","description":"Parse HTTP X-Forwarded-For header","directories":{},"_nodeVersion":"24.21.0","_hasShrinkwrap":false,"devDependencies":{"c8":"^12.0.0","eslint":"^9.17.0","tstyche":"^7.0.0","benchmark":"2.1.4","@types/node":"^26.0.1","neostandard":"^0.13.0"},"_npmOperationalInternal":{"tmp":"tmp/forwarded_3.1.0_1791627863495_0.5124094661161527","host":"s3://npm-registry-packages-npm-production"},"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","publish_time":1791627863572,"_cnpm_publish_time":1791627863572,"dist-tags":{"latest":"3.1.2"}}