From e894b14dc903cc17e58cfdf058ff95024787e615 Mon Sep 17 00:00:00 2001 From: Gareth Visagie Date: Thu, 29 Jun 2017 17:16:22 +0100 Subject: [PATCH] feat: allow custom broker client healthcheck path The broker client healthcheck path can be customised by setting the BROKER_HEALTHCHECK_PATH environment variable (or providing it in the `.env` file), to be more accommodating of existing load balancers. --- lib/client/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/index.js b/lib/client/index.js index 1b5c618ef..4b4e18832 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -16,7 +16,7 @@ module.exports = ({ port = null, config = {}, filters = {} }) => { const { app, server } = require('../webserver')(config, port); // IMPORTANT: defined before relay (`app.all('/*', ...`) - app.get('/healthcheck', (req, res, next) => { + app.get(config.brokerHealthcheckPath || '/healthcheck', (req, res) => { return res.status(200).json({ ok: true }); });