diff --git a/server.js b/server.js index 1823406..1d33872 100644 --- a/server.js +++ b/server.js @@ -6,9 +6,9 @@ const PORT = process.env.PORT || 3000; app.use(function (req, res, next) { if (req.headers['x-forwarded-proto'] === 'http') { - next(); - } else { res.redirect('http://' + req.hostname + req.url); + } else { + next(); } }); app.use(express.static('public'));