diff --git a/lib/server.js b/lib/server.js index 4065e18d1..597f2cc93 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();