From ddd6211bbcc6b0065e0e519341e218326ce17478 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 18 Oct 2023 21:24:48 +0100 Subject: [PATCH] fix: https binding to wrong port at startup #2610 --- lib/Service/Https.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Service/Https.js b/lib/Service/Https.js index 58ccd75488..2b4688230a 100644 --- a/lib/Service/Https.js +++ b/lib/Service/Https.js @@ -65,6 +65,10 @@ class ServiceHttps extends ServiceBase { * @access protected */ listen() { + if (this.portConfig) { + this.port = Number(this.userconfig.getKey(this.portConfig)) + } + if (this.server === undefined) { if (this.userconfig.getKey('https_cert_type') == 'external') { const priv = this.userconfig.getKey('https_ext_private_key') @@ -136,6 +140,7 @@ class ServiceHttps extends ServiceBase { * @param {Object} credentials - the certificate information */ startServer(credentials) { + console.log('start https', this.port, this.bindIP) try { this.server = _https.createServer(credentials, this.express) this.server.on('error', this.handleSocketError.bind(this))