auth0/forwarded

Name: forwarded

Owner: Auth0

Description: Parse HTTP X-Forwarded-For header

Forked from: jshttp/forwarded

Created: 2017-05-22 17:01:19.0

Updated: 2017-05-22 17:01:20.0

Pushed: 2017-05-22 17:16:03.0

Homepage: null

Size: 9

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

forwarded

NPM Version NPM Downloads Node.js Version Build Status Test Coverage

Parse HTTP X-Forwarded-For header

Installation
m install forwarded
API
forwarded = require('forwarded')
forwarded(req)
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
m test
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.