Skip to content

Commit e333c44

Browse files
committed
Remove path from secureRedirect path
1 parent cba7f60 commit e333c44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

middleware/secureRedirect.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module.exports = (req, res, next) => {
88
const host = req.get('host');
99
const redirect = proto !== 'https' || hosts.indexOf(host) > -1;
1010
const redirectTo = (hosts.indexOf(host) > -1)
11-
? `https://www.${host}${req.path}`
12-
: `https://${host}${req.path}`;
11+
? `https://www.${host}`
12+
: `https://${host}`;
1313

1414
if (redirect) {
1515
res.redirect(301, `${redirectTo}${req.originalUrl}`);

0 commit comments

Comments
 (0)