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

addr

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

addr - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.travis.yml

4

index.js
module.exports = function addr(req, proxies) {
if (!req.headers['x-forwarded-for']) {
return req.connection.remoteAddress;
return req.connection._peername && req.connection._peername.address || req.connection.remoteAddress;
}

@@ -12,5 +12,5 @@ if (typeof proxies === 'string') {

// source.
return req.connection.remoteAddress;
return req.connection._peername && req.connection._peername.address || req.connection.remoteAddress;
}
return req.headers['x-forwarded-for'].split(/\s?,\s?/).shift();
};
{
"name": "addr",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get the remote address of a request, with reverse-proxy support",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,2 +6,4 @@ addr

[![build status](https://secure.travis-ci.org/carlos8f/node-addr.png)](http://travis-ci.org/carlos8f/node-addr)
Usage

@@ -8,0 +10,0 @@ =====

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