https quick fix, TLS and NOTLS modes working
[henge/kiak.git] / main.js
diff --git a/main.js b/main.js
index a058a1c..cdf8601 100644 (file)
--- a/main.js
+++ b/main.js
@@ -112,7 +112,7 @@ if (!opts['no-tls']) {
         console.log(`ERR: Cert ${opts['ca-cert']} inaccessible, tls will fail`)
       else if (key != undefined) {
         router.httpsOpts = { cert: cert, key: key}
-        router.httpd = https.createServer(this.httpsOpts, router.respond)
+        router.httpd = https.createServer(router.httpsOpts, router.respond)
           .listen(opts['port'])
       }
     }