fix redirect match
This commit is contained in:
parent
d4d663e3dd
commit
e7a6b46cc1
|
@ -43,7 +43,7 @@ module.exports.create = function (securePort, insecurePort, info, serverCallback
|
||||||
// needs ECDSA?
|
// needs ECDSA?
|
||||||
|
|
||||||
console.warn('HARD-CODED HTTPS EXCEPTION in insecure-server.js');
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,9 @@ module.exports.scrubTheDub = function (req, res, redirectives) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newLocation = 'https://' + hostname.replace(/^www\./, '') + req.url;
|
newLocation = 'https://' + hostname.replace(/^www\./, '');
|
||||||
}
|
}
|
||||||
|
newLocation += req.url;
|
||||||
safeLocation = escapeHtml(newLocation);
|
safeLocation = escapeHtml(newLocation);
|
||||||
|
|
||||||
var metaRedirect = ''
|
var metaRedirect = ''
|
||||||
|
|
Loading…
Reference in New Issue