fix redirect match

This commit is contained in:
AJ ONeal 2015-11-23 09:31:54 +00:00
parent d4d663e3dd
commit e7a6b46cc1
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ module.exports.create = function (securePort, insecurePort, info, serverCallback
// needs ECDSA?
console.warn('HARD-CODED HTTPS EXCEPTION in insecure-server.js');
if (/redirect-www.org/.test(host) && useAppInsecurely(req, res)) {
if (/redirect-www.org$/.test(host) && useAppInsecurely(req, res)) {
return true;
}

View File

@ -20,8 +20,9 @@ module.exports.scrubTheDub = function (req, res, redirectives) {
return false;
}
} else {
newLocation = 'https://' + hostname.replace(/^www\./, '') + req.url;
newLocation = 'https://' + hostname.replace(/^www\./, '');
}
newLocation += req.url;
safeLocation = escapeHtml(newLocation);
var metaRedirect = ''