From 439b66381515c57b5a076d0cfb0778d1478a5b9a Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Wed, 19 May 2021 20:54:18 +0300 Subject: [PATCH] fixed SNI for API --- api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.js b/api.js index 5378abb9..83aa1aa6 100644 --- a/api.js +++ b/api.js @@ -139,11 +139,11 @@ certs.loadTLSOptions(certOptions, 'api'); if (config.api.secure && certOptions.key) { let httpsServerOptions = {}; - serverOptions.key = httpsServerOptions.key = certOptions.key; + httpsServerOptions.key = certOptions.key; if (httpsServerOptions.ca) { - serverOptions.ca = httpsServerOptions.ca = certOptions.ca; + httpsServerOptions.ca = certOptions.ca; } - serverOptions.certificate = httpsServerOptions.certificate = certOptions.cert; + httpsServerOptions.cert = certOptions.cert; let defaultSecureContext = tls.createSecureContext(httpsServerOptions);