remoteip
v0.1.0
Published
Get the client IP address for the remote browser.
Downloads
72
Readme
RemoteIP
A simple method for getting the client IP address for the remote browser. Demo @ http://remoteip.herokuapp.com
$ npm install remoteip
Usage
var remoteip = require('remoteip');
// Get the IP address for the user.
var ipAddress = remoteip.get(req);
Notes
The client IP address is determined by the following:
- Check the x-forwarded-for HTTP header for a remote IP address.
- Check the req.connection.remoteAddress property.
Source
https://github.com/primaryobjects/remoteip
Author
Kory Becker http://www.primaryobjects.com