diff --git a/server.js b/server.js index 009c2d4..9a040dc 100644 --- a/server.js +++ b/server.js @@ -35,7 +35,7 @@ const redirectToHTTPS = (req, res, next) => { app.use("/api", redirectToHTTPS); app.use("/img", redirectToHTTPS); -app.get("/", redirectToHTTPS); +app.all("/", redirectToHTTPS); // no app.use here because it would match every path app.get("/", (req, res) => { res.sendFile(__dirname + "/views/index.html"); });