added healthchecker url before ipfiltering
This commit is contained in:
parent
1755adafc0
commit
af6cd9e07f
1 changed files with 5 additions and 0 deletions
|
|
@ -39,6 +39,11 @@ function safeShutdownGuard(req, res, next) {
|
||||||
// express
|
// express
|
||||||
app.use(safeShutdownGuard);
|
app.use(safeShutdownGuard);
|
||||||
app.use(session);
|
app.use(session);
|
||||||
|
//just respond with success for healthchecker no matter what the ip addess is
|
||||||
|
app.get('/status', function (req, res) {
|
||||||
|
res.status(200).send('success');
|
||||||
|
});
|
||||||
|
//restrict access to anything else via ip addresses
|
||||||
if (config.ipfilter.allowed_ips.length > 0) app.use(ipfilter(config.ipfilter.allowed_ips, { mode: 'allow' }))
|
if (config.ipfilter.allowed_ips.length > 0) app.use(ipfilter(config.ipfilter.allowed_ips, { mode: 'allow' }))
|
||||||
if (config.accesslog) app.use(logger('common'));
|
if (config.accesslog) app.use(logger('common'));
|
||||||
app.disable('x-powered-by');
|
app.disable('x-powered-by');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue