fix(server) createRedirect: add sslPort

This commit is contained in:
coderaiser 2014-02-25 07:24:59 -05:00
parent 673af7c7f6
commit 2c5b82acca

View file

@ -83,7 +83,7 @@
if (!ssl)
createServer(port, ip, HTTP);
else {
createRedirect(port, ip, HTTPS);
createRedirect(port, ip, HTTPS, sslPort);
createServer(sslPort, ip, HTTP, ssl, function() {
Util.log('Could not use https port: ' + sslPort);
@ -94,7 +94,7 @@
}
}
function createRedirect(port, ip, protocol) {
function createRedirect(port, ip, protocol, sslPort) {
var server = function(req, res) {
var url,
host = req.headers.host,