{"name":"@fastify/forwarded","version":"3.0.0","keywords":["x-forwarded-for","http","req"],"license":"MIT","_id":"@fastify/forwarded@3.0.0","maintainers":[{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"}],"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Douglas Christopher Wilson","email":"doug@somethingdoug.com"},{"name":"Aras Abbasi"}],"homepage":"https://github.com/fastify/forwarded#readme","bugs":{"url":"https://github.com/fastify/forwarded/issues"},"dist":{"shasum":"0fc96cdbbb5a38ad453d2d5533a34f09b4949b37","tarball":"http://registry-npm.ywwl.com/@fastify/forwarded/download/@fastify/forwarded-3.0.0.tgz","fileCount":5,"integrity":"sha512-kJExsp4JCms7ipzg7SJ3y8DwmePaELHxKYtg+tZow+k0znUTf3cb+npgyqm8+ATZOdmfgfydIebPDWM172wfyA==","signatures":[{"sig":"MEYCIQDAcdV1vMZvp4gn4FohebHiupwonVsWLkITk2dzhEggvwIhAIZiYwcDt+u2yrTovg7+3L04KukVDtENB2ONvttLTXDJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4961,"size":2364,"noattachment":false,"key":"/@fastify/forwarded/-/@fastify/forwarded-3.0.0.tgz"},"type":"commonjs","types":"types/index.d.ts","gitHead":"740af1addc86248c23a6e3274689a04e13488e58","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","bench":"node benchmark/index.js","lint:fix":"standard --fix","test:unit":"tap","bench:combined":"node benchmark/combined.js","test:typescript":"tsd"},"_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"repository":{"url":"git+https://github.com/fastify/forwarded.git","type":"git"},"_npmVersion":"10.7.0","description":"Parse HTTP X-Forwarded-For header","directories":{},"_nodeVersion":"20.15.0","_hasShrinkwrap":false,"devDependencies":{"tap":"^18.8.0","tsd":"^0.31.1","standard":"^17.1.0","benchmark":"2.1.4","@types/node":"^20.14.9"},"_npmOperationalInternal":{"tmp":"tmp/forwarded_3.0.0_1720868476449_0.7777709463033355","host":"s3://npm-registry-packages"},"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":1720868476594,"_cnpm_publish_time":1720868476594,"dist-tags":{"latest":"3.1.2"}}