fix(server) redirect port

This commit is contained in:
coderaiser 2013-11-22 10:00:04 +00:00
parent 12073ee5eb
commit 1ed9b01f54

View file

@ -101,8 +101,12 @@
Util.log('* Redirection http -> https is setted up');
lServerLog(lHTTP, lPort);
var lRedirectServer = http.createServer( function(pReq, pRes) {
var lHost = pReq.headers.host,
lURL = lHTTPS + lHost + pReq.url + ':' + lSSLPort;
var lURL,
lHost = pReq.headers.host,
lParsed = URL.parse(lHost),
lHostName = lParsed.protocol;
lURL = lHTTPS + lHostName + lSSLPort + pReq.url;
main.redirect({
response: pRes,