Skip to content

Commit

Permalink
redirect fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxchistt committed Jun 14, 2021
1 parent d69d0b8 commit 49b0316
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/middleware/https.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @param {*} next
*/
module.exports = (req, res, next) => {
if (req.header('x-forwarded-proto') !== 'https') {
if (req.header('x-forwarded-proto') === 'http') {
res.redirect(`https://${req.header('host')}${req.url}`)
} else {
next()
Expand Down

0 comments on commit 49b0316

Please sign in to comment.