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

user-ip

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

user-ip - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

6

lib/extract-ip.js

@@ -18,2 +18,8 @@ 'use strict';

const xRealIP = (req.headers['X-Real-IP'] || req.headers['x-real-ip']);
if (xRealIP) {
const userIP = xRealIP.split(',')[0];
return userIP;
}
const clientRemoteAddress = req.client.remoteAddress;

@@ -20,0 +26,0 @@

8

package.json
{
"name": "user-ip",
"version": "1.0.1",
"description": "Simple NPM to know your user's IP Address",
"version": "1.1.0",
"description": "Simple NPM to know your user's real IP Address from request",
"main": "index.js",

@@ -29,5 +29,5 @@ "scripts": {

"chai": "^4.1.0",
"mocha": "^3.4.2",
"supertest": "^3.0.0"
"mocha": "^8.3.2",
"supertest": "^6.1.3"
}
}
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