From db4b2cd984e9b7dd82e0af5995e7235eb2f67517 Mon Sep 17 00:00:00 2001 From: Kyle <3204236+DevKyleS@users.noreply.github.com> Date: Wed, 14 Sep 2022 14:25:56 -0600 Subject: [PATCH] Re-add support for UPTIME_KUMA_HOST and _PORT in healthcheck.js --- extra/healthcheck.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/healthcheck.js b/extra/healthcheck.js index 9e5e4e3d8..0c35fe2f5 100644 --- a/extra/healthcheck.js +++ b/extra/healthcheck.js @@ -18,17 +18,17 @@ if (sslKey && sslCert) { // If host is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available and the unspecified IPv4 address (0.0.0.0) otherwise. // Dual-stack support for (::) -let hostname = process.env.UPTIME_KUMA_SERVICE_HOST; +let hostname = process.env.UPTIME_KUMA_SERVICE_HOST || process.env.UPTIME_KUMA_HOST || "127.0.0.1"; // Also read HOST if not *BSD, as HOST is a system environment variable in FreeBSD if (!hostname && !FBSD) { hostname = process.env.HOST; } -const port = parseInt(process.env.UPTIME_KUMA_SERVICE_PORT || process.env.PORT || 3001); +const port = parseInt(process.env.UPTIME_KUMA_SERVICE_PORT || process.env.UPTIME_KUMA_PORT || process.env.PORT || 3001); let options = { - host: hostname || "127.0.0.1", + host: hostname, port: port, timeout: 28 * 1000, };