From af6cd9e07f09d1a1af72e01ec5b02aadf07ea49a Mon Sep 17 00:00:00 2001 From: Tom Broughton Date: Fri, 27 Oct 2023 09:05:42 +0100 Subject: [PATCH] added healthchecker url before ipfiltering --- app/server/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/server/app.js b/app/server/app.js index 9a597cb..83c3d29 100644 --- a/app/server/app.js +++ b/app/server/app.js @@ -39,6 +39,11 @@ function safeShutdownGuard(req, res, next) { // express app.use(safeShutdownGuard); 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.accesslog) app.use(logger('common')); app.disable('x-powered-by');