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

request-ip

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-ip - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

10

package.json
{
"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>",

21

README.md
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)
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