Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastify/forwarded

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/forwarded

Parse HTTP X-Forwarded-For header

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-53.3%
Maintainers
3
Weekly downloads
 
Created
Source

@fastify/forwarded

CI NPM version js-standard-style

Parse HTTP X-Forwarded-For header.

Updated version of the great https://github.com/jshttp/forwarded. Implements https://github.com/jshttp/forwarded/pull/9.

Installation

$ npm install @fastifyjs/forwarded

API

var forwarded = require('@fastify/forwarded')

forwarded(req)

var addresses = forwarded(req)

Parse the X-Forwarded-For header from the request. Returns an array of the addresses, including the socket address for the req, in reverse order (i.e. index 0 is the socket address and the last index is the furthest address, typically the end-user).

Testing

$ npm test

License

MIT

Keywords

FAQs

Package last updated on 25 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc