express-public-ip

Filter private addresses from req.ips

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
express-public-ip
111.0.19 years ago9 years agoMinified + gzip package size for express-public-ip in KB

Readme

express-public-ip Build Status
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