0.0.1 • Published 6 years ago

@financial-times/ip-whitelist v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

ip-whitelist

npm version CircleCI

This module is an express middleware that can verify if a user belongs to a whitelist.

Setup

  npm install -S @financial-times/ip-whitelist

Usage

Set the whitelist data to the app.locals object in your application. Then call this middleware after the s3o-middleware

var authS3O = require('@financial-times/s3o-middleware');
var whitelist = require('@financial-times/ip-whitelist');
const whitelistData = require('route to your whitelist data');
...
const app = express();
app.locals.whitelistData = whitelistData;
app.use(authS3O);
app.use(whitelist);
...

Licence

MIT