diff --git a/server.js b/server.js index 7eba80e..009c2d4 100644 --- a/server.js +++ b/server.js @@ -29,7 +29,7 @@ const redirectToHTTPS = (req, res, next) => { next(); } else { // request was via http, so redirect to https - res.redirect("https://" + req.headers.host + req.url); + res.redirect("https://" + req.headers.host + req.originalUrl); } }; app.use("/api", redirectToHTTPS);