Fix IP whitelisting

This commit is contained in:
Jake Howard 2017-02-13 13:39:26 +00:00
parent c8862c1a2a
commit 9933f7574e

View file

@ -20,14 +20,13 @@ const basicAuth = require('./basic-auth');
if (consts.ALLOWED_IPS) { if (consts.ALLOWED_IPS) {
app.set('trust proxy', true); app.set('trust proxy', true);
app.use(AccessControl({ app.use(AccessControl({
mode: 'allow', mode: 'allow',
allows: consts.ALLOWED_IPS, allows: consts.ALLOWED_IPS,
forceConnectionAddress: true,
statusCode: 404 statusCode: 404
})); }));
} }
// Custom Middleware // Custom Middleware
app.use(logging); app.use(logging);
app.use(basicAuth); app.use(basicAuth);