Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 3, 2024 via pnpm

proxy-addr 1.0.10

Determine address of proxied request
Package summary
Share
0
issues
1
license
3
MIT
Package created
5 May 2014
Version published
10 Dec 2015
Maintainers
1
Total deps
3
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
3 Packages, Including:
forwarded@0.1.2
ipaddr.js@1.0.5
proxy-addr@1.0.10
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of proxy-addr 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
forwarded0.1.22.53 kBMIT
prod
ipaddr.js1.0.513.56 kBMIT
prod

Visualizations

Frequently Asked Questions

What does proxy-addr do?

Proxy-addr is a Node.js module that serves as an advanced solution to determine the address of a proxied web request. In a web context where many requests may be routed through various proxies before reaching its target, this utility helps decipher the original source of the request.

How do you use proxy-addr?

The proxy-addr module can be utilized by first installing it through the npm registry using the command $ npm install proxy-addr. Upon installation, you can import the module into your JavaScript file using var proxyaddr = require('proxy-addr').

There are three primary functions available:

  1. proxyaddr(req, trust): This returns the address of the request based on the trust parameter, which is a function that should return true for trusted addresses and false for untrusted ones.

Example:

proxyaddr(req, function (addr) { return addr === '127.0.0.1' })  
proxyaddr(req, function (addr, i) { return i < 1 })   
  1. proxyaddr.all(req, [trust]): This returns all addresses of the request, optionally stopping at the first untrusted. The optional trust argument takes the same arguments as trust does in proxyaddr(req, trust).

Example:

proxyaddr.all(req, 'loopback')
  1. proxyaddr.compile(val): This compiles argument val into a trust function. This function takes the same arguments as trust does in proxyaddr(req, trust) and returns a function suitable for proxyaddr(req, trust).

Example:

var trust = proxyaddr.compile('loopback')
var addr = proxyaddr(req, trust)

Where are the proxy-addr docs?

The proxy-addr documentation is embedded within the README file in the project repository on GitHub. It doesn't have a dedicated documentation website. The GitHub repository URL is https://github.com/jshttp/proxy-addr, where you can access detailed information about the features and functions of the proxy-addr npm package.