Socket
Socket
Sign inDemoInstall

7239

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

7239

Parses Forwarded headers according to RFC 7239.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

7239

Build status

A module to parse Forwarded headers according to RFC 7239.

const sttn = require('7239');

sttn.parseForwardedHeader('for=203.0.113.72;proto=https')
// [{ for: '203.0.113.72', proto: 'https', by: null, host: null }]

sttn.parseForwardedHeader('for=[2001:db8::39]')
// null

app.use(sttn.middleware);

The middleware is compatible with Connect (and therefore Express). It adds a forwarded property to the request, with the value of the last forwarded element or { for: null, proto: null, by: null, host: null } if no such object exists or if the header is invalid.

Keywords

FAQs

Package last updated on 15 Sep 2015

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