Comparing version 1.0.1 to 1.1.0
@@ -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 @@ |
{ | ||
"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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55
4418
7