request-ip
Advanced tools
Comparing version 1.1.3 to 1.1.4
12
index.js
@@ -83,5 +83,11 @@ /** | ||
// ensure getting client IP address still works in development environment | ||
ipAddress = req.connection.remoteAddress || | ||
req.socket.remoteAddress || | ||
req.connection.socket.remoteAddress; // for https | ||
// if despite all this we do not find ip, then it returns null | ||
try { | ||
ipAddress = req.connection.remoteAddress || | ||
req.socket.remoteAddress || | ||
req.connection.socket.remoteAddress || // for https | ||
null; | ||
} catch(e) { | ||
ipAddress = null; | ||
} | ||
} | ||
@@ -88,0 +94,0 @@ |
{ | ||
"name": "request-ip", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "A small node.js module to retrieve the request's IP address", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -41,2 +41,4 @@ #request-ip | ||
If cannot find an IP address, return `null`. | ||
## Samples Use Cases | ||
@@ -52,3 +54,3 @@ | ||
Make sure you have the necessary dependencies: | ||
Make sure you have the necessary dev dependencies needed to run the tests: | ||
@@ -67,2 +69,6 @@ ``` | ||
1.1.4 | ||
* * add case management where you can not find the IP address, so we return NULL | ||
1.1.3 | ||
@@ -84,2 +90,3 @@ | ||
* production ready with stable API | ||
* add semver | ||
@@ -86,0 +93,0 @@ |
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
14663
295
110