From a5b451a5db35eff50b53420de2636d362f18d2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Eredics?= Date: Sat, 19 Jan 2019 00:42:23 +0100 Subject: [PATCH] fix server's url property fix returning http:// when https:// server is created by setting the secure variable when a secure server is created --- lib/server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/server.js b/lib/server.js index 4cec6130e..70f1fa60c 100644 --- a/lib/server.js +++ b/lib/server.js @@ -172,6 +172,7 @@ function Server(options) { ); this.http2 = true; + this.secure = true; this.server = http2.createSecureServer(options.http2); } else if ((options.cert || options.certificate) && options.key) { this.ca = options.ca; @@ -191,6 +192,7 @@ function Server(options) { secureOptions: options.secureOptions }); } else if (options.httpsServerOptions) { + this.secure = true; this.server = https.createServer(options.httpsServerOptions); } else { this.server = http.createServer();