Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/floatdrop/express-public-ip
Filter private addresses from req.ips
https://github.com/floatdrop/express-public-ip
Last synced: 22 days ago
JSON representation
Filter private addresses from req.ips
- Host: GitHub
- URL: https://github.com/floatdrop/express-public-ip
- Owner: floatdrop
- License: mit
- Created: 2015-09-22T18:25:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-22T19:17:50.000Z (over 9 years ago)
- Last Synced: 2024-12-11T20:40:32.133Z (24 days ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# express-public-ip [![Build Status](https://travis-ci.org/floatdrop/express-public-ip.svg?branch=master)](https://travis-ci.org/floatdrop/express-public-ip)
> Filter private addresses from req.ips
## Install
```
$ npm install --save express express-public-ip
```## Usage
```js
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](http://github.com/floatdrop)