{"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":{"integrity":"sha512-sMgCIKEVIZF0m7fGWSdE2TYmchRpBZpQ+XATpkiJQIFbhJH6ELMwZiXq8TI8+wWZaxO7//lOl91ApXp2kEudfg==","shasum":"17e26a8d110665be41607dd11effc94cd929ad00","tarball":"http://registry-npm.ywwl.com/@fastify/forwarded/download/@fastify/forwarded-2.2.0.tgz","fileCount":5,"unpackedSize":4938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDG0e9dhmQVj6aIPaTIO3HEKBoFpJ1ip5dosEb8Jp1zmAiASnqM3S7WCzuCA97YzMIBLcxemzfpsbOu1pNo19xOKiA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjTjIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjBRAAjOHBHy6q9azmcn+pV09SvxfooLjlEEhhRFE5+rJ1QrHM4fPM\r\nG61Cdbk/x6sZeqtCp98ToXDII7H5jheeqGiVhUmF5E3CMr3W0oK/ifg0eGdf\r\nJbir3lks52NGQlLT2TXOmh1p+8FuKMqUQQwkNQS7O0BqqCZ9fqCZqhjFwVrf\r\nK98qWD3G6jgt1RpT2Qh40zR6f0aYKjcgjiON9AMrHSFOYh373H8ttNddURYy\r\nsAKpI9uLCZPlLDgnZPdt03eSybt7jhRWtqxqcJClfXtDhnKDRt3/IbKcKJR8\r\nG6IAXkQAtiqLNQLGCh/vIlEF88u2KoeZHQMnoq+YDvY3uAyU0Y4K9aXQFyqX\r\naYK77EJikOpuc2owQHp771i9UDLHjOjy9iPJPEu2SPO1XzINEnUsDCL8Zbqr\r\ntxgPUKrQg4iqQP0p2y9kfq8e3Qmi3zrhhXjZXeY63WrVcu/ocRZddF2qquVU\r\nBBwv9QYm6aNYWQGJ0PrtS23AUucPD8VMM8u7SdIcr1iFgMlHWFdIwF5boksv\r\nIc6SDCQv3iVyTFsYiWILo1M8SLeh5NXI7GBx/wPaY6BENl2lsSK9Kco4rWyR\r\nz0UiGt05v689Mg75JBbOfX2pqgna4g5oYmwaPX965oL2gJ9rGEvgTyFP1f+A\r\n3toZIGEhZJ84LDH7sPd1gdBvpb/GzJ3IY5o=\r\n=shwa\r\n-----END PGP SIGNATURE-----\r\n","size":2339,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-2.2.0.tgz"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"jsumners","email":"james.sumners@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forwarded_2.2.0_1670199496387_0.6575630832020185"},"_hasShrinkwrap":false,"readme":"# @fastify/forwarded\n\n![CI](https://github.com/fastify/forwarded/workflows/CI/badge.svg)\n[![NPM version](https://img.shields.io/npm/v/@fastify/forwarded.svg?style=flat)](https://www.npmjs.com/package/@fastify/forwarded)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)\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\nvar forwarded = require('@fastify/forwarded')\n```\n\n### forwarded(req)\n\n```js\nvar 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":1670199496640,"_cnpm_publish_time":1670199496640,"dist-tags":{"latest":"3.1.2"}}