From c372868b13f61c913c190cac8ce158f6b55d42e8 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Thu, 19 Dec 2019 12:37:01 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=AF=F0=9F=8D=98=20Checkpoint=20./serve?= =?UTF-8?q?r.js:933874/184?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);