Fix plain HTTP server

parent a6bb564d
No related merge requests found
...@@ -80,7 +80,7 @@ console.log('HTTPS server started and listening at ' + listenInterface + ':' + ...@@ -80,7 +80,7 @@ console.log('HTTPS server started and listening at ' + listenInterface + ':' +
port); port);
// Dummy HTTP server redirecting to HTTPS. Only has sense if we can use port 80 // Dummy HTTP server redirecting to HTTPS. Only has sense if we can use port 80
if (redirect = '1') { if (redirect === '1') {
try { try {
var httpPort = 80; var httpPort = 80;
http.createServer(function(req, res) { http.createServer(function(req, res) {
...@@ -104,7 +104,7 @@ if (redirect = '1') { ...@@ -104,7 +104,7 @@ if (redirect = '1') {
}).listen(httpPort, listenInterface); }).listen(httpPort, listenInterface);
console.log('HTTP redirect server started and listening at ' + console.log('HTTP redirect server started and listening at ' +
listenInterface + ':' + httpPort); listenInterface + ':' + httpPort);
} catch (EACCES) { } catch (error) {
console.log('Couldn\'t start plain HTTP redirection server : ' + EACCESS) console.log('Couldn\'t start plain HTTP redirection server : ' + error)
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment