express-public-ip
v1.0.1
Published
Filter private addresses from req.ips
Downloads
70
Maintainers
Readme
express-public-ip
Filter private addresses from req.ips
Install
$ npm install --save express express-public-ip
Usage
var app = require('express')();
var expressPublicIp = require('express-public-ip');
app.enable('trust proxy');
app.use(expressPublicIp());
app.get('/', function (req, res) {
res.send(req.ip);
});
API
expressPublicIp()
Returns express-public-ip
middleware function.
License
MIT © Vsevolod Strukchinsky