mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-19 12:44:27 -05:00
Re-add support for UPTIME_KUMA_HOST and _PORT in healthcheck.js
This commit is contained in:
parent
b4f0f8bca5
commit
db4b2cd984
@ -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.
|
// 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 (::)
|
// 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
|
// Also read HOST if not *BSD, as HOST is a system environment variable in FreeBSD
|
||||||
if (!hostname && !FBSD) {
|
if (!hostname && !FBSD) {
|
||||||
hostname = process.env.HOST;
|
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 = {
|
let options = {
|
||||||
host: hostname || "127.0.0.1",
|
host: hostname,
|
||||||
port: port,
|
port: port,
|
||||||
timeout: 28 * 1000,
|
timeout: 28 * 1000,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user