From 391692a708e18efbb8953dbec76b56cabd611929 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Thu, 9 Mar 2023 00:00:07 +0800 Subject: [PATCH] Chore: Add support for encrypted SSL-key --- server/uptime-kuma-server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/uptime-kuma-server.js b/server/uptime-kuma-server.js index 0573f0d8c..6b4d7acf2 100644 --- a/server/uptime-kuma-server.js +++ b/server/uptime-kuma-server.js @@ -74,6 +74,7 @@ class UptimeKumaServer { // SSL const sslKey = args["ssl-key"] || process.env.UPTIME_KUMA_SSL_KEY || process.env.SSL_KEY || undefined; const sslCert = args["ssl-cert"] || process.env.UPTIME_KUMA_SSL_CERT || process.env.SSL_CERT || undefined; + const sslKeyPassphrase = args["ssl-key-passphrase"] || process.env.UPTIME_KUMA_SSL_KEY_PASSPHRASE || process.env.SSL_KEY_PASSPHRASE || undefined; log.info("server", "Creating express and socket.io instance"); this.app = express(); @@ -81,7 +82,8 @@ class UptimeKumaServer { log.info("server", "Server Type: HTTPS"); this.httpServer = https.createServer({ key: fs.readFileSync(sslKey), - cert: fs.readFileSync(sslCert) + cert: fs.readFileSync(sslCert), + passphrase: sslKeyPassphrase, }, this.app); } else { log.info("server", "Server Type: HTTP");