{"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":{"integrity":"sha512-B+bgWWZJrcJ+UunJWeZhWQm2S/BvOGyxDtkLpd98BkJ/cBCd9rxJ3+fcDy7B6yvtZ3EdR70brP2t+wI1x2NIsw==","shasum":"5bbcacc45d18f55d0a1fe289eb3dfda941da11f2","tarball":"http://registry-npm.ywwl.com/@fastify/forwarded/download/@fastify/forwarded-2.1.0.tgz","fileCount":5,"unpackedSize":4833,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP9fvYVxVKYvJ+9K5T1HVl5qNBSrlBf1tyxrKJQbxWNQIhAM9YR1ZJfEUQfeWJDd6DEow5aTrO3946wCw31YAmtxl/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixrzbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVvw/9ExdhGsKFe6Bs/YnPYreYG2EzzjC5TqWphajfGMlQ63I2QT67\r\nOEGwWuv+CvIRiQHebrCNGr8BGnKukhnsWvZvf9l6M8sFrrzJp2jvlP3QZoOc\r\nG1cjrdSSRzhdWkeJb0WO6JDGhtKsWNPUYUCOaimRNFz5EuG5ajbId0VLhYyR\r\n56dBO3zHkaUSai3XZ/mUFwhzKXYkjEmWQj8a97xA5qoMcfp8xFIJo9cEvTJw\r\nHElLI/9IXJ5wo/+65G4o3zZmw+w1XvK3H8jRj1092TcoW7ET4XfPN7kO2cAV\r\n6zU4iQXgTmNVTp1xcIelG7ukw+fpn9/qbayF11HD5NDUjqtmm50Un0TwSely\r\nLWPCmODxIX7nOgwt2WIuMbaKD5sVzFGct2sZuMRyQmdRHR9nTPFqcjrWEQb1\r\nKRVG55ECRcKRYQGES3md50aYYtz0IwhPLEtPrpdzbpo4CNGmBeWxEPljH6bt\r\nEBo2WbTAeiY3/0bljmwFOR+QwKeUah1ZoyS1/o4SKsidusTDcoY0FaB0ptNo\r\nzIm22dNVKT+/sA+M5xR7revCdKpf6lQeA0wgvIoTcBTKYPtK1MdSNkLzAMVk\r\nm/Ktct4ZktGX3jIforUZdNJpmCRSgIJhZZfycL6EMLZDBxYeYDpgactOD3w6\r\ntkNg+rxxrYbiMPvYfLIBWeUDOyOkwY/RLy8=\r\n=VdCG\r\n-----END PGP SIGNATURE-----\r\n","size":2293,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-2.1.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.1.0_1657191643661_0.6575871490871328"},"_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":1657191643819,"_cnpm_publish_time":1657191643819,"dist-tags":{"latest":"3.1.2"}}