This commit is contained in:
Andris Reinman 2021-05-19 20:34:27 +03:00
parent c3d4add637
commit c08a186f4e

6
api.js
View file

@ -139,11 +139,11 @@ certs.loadTLSOptions(certOptions, 'api');
if (config.api.secure && certOptions.key) {
let httpsServerOptions = {};
httpsServerOptions.key = certOptions.key;
serverOptions.key = httpsServerOptions.key = certOptions.key;
if (httpsServerOptions.ca) {
httpsServerOptions.ca = certOptions.ca;
serverOptions.ca = httpsServerOptions.ca = certOptions.ca;
}
httpsServerOptions.certificate = certOptions.cert;
serverOptions.certificate = httpsServerOptions.certificate = certOptions.cert;
let defaultSecureContext = tls.createSecureContext(httpsServerOptions);