request-ip
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "request-ip", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A small node.js module to retrieve the request's IP address", | ||
@@ -13,6 +13,8 @@ "main": "index.js", | ||
"client", | ||
"header", | ||
"X-Client-IP", | ||
"X-Forwarded-For", | ||
"connection.remoteAddress", | ||
"middleware", | ||
"request", | ||
"X-Client-IP", | ||
"X-Forwarded-For" | ||
"request" | ||
], | ||
@@ -19,0 +21,0 @@ "author": "Petar Bojinov <petarbojinov@gmail.com>", |
request-ip | ||
========= | ||
> A small node.js module to retrieve the request's IP address. | ||
> A tiny Node.js module to retrieve a request's IP address. | ||
Maintainer: [Petar Bojinov](https://github.com/pbojinov) | ||
> Maintainer: [Petar Bojinov](https://github.com/pbojinov) | ||
@@ -12,3 +12,2 @@ ## Use Case | ||
## Installation | ||
@@ -30,2 +29,10 @@ | ||
## How It Works | ||
**request-ip** looks for two specific headers in the request and falls back to `req.connection.remoteAddress`. The following is the order we use to determine the user ip from the request. | ||
1. `X-Client-IP` | ||
2. `X-Forwarded-For` header may return multiple IP addresses in the format: "client IP, proxy 1 IP,proxy 2 IP", so we take the the first one. | ||
3. `req.connection.remoteAddress` | ||
## Dependencies | ||
@@ -35,4 +42,10 @@ | ||
## Release Notes | ||
0.0.1 | ||
* initial release | ||
## License | ||
The MIT License (MIT) | ||
The MIT License (MIT) |
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
3925
48