remoteip
Version:
Get the client IP address for the remote browser.
34 lines (22 loc) • 621 B
Markdown
RemoteIP
--------
A simple method for getting the client IP address for the remote browser.
Demo @ http://remoteip.herokuapp.com
```bash
$ npm install remoteip
```
```
var remoteip = require('remoteip');
// Get the IP address for the user.
var ipAddress = remoteip.get(req);
```
The client IP address is determined by the following:
1. Check the x-forwarded-for HTTP header for a remote IP address.
2. Check the req.connection.remoteAddress property.
https://github.com/primaryobjects/remoteip
Kory Becker
http://www.primaryobjects.com