From 55cd2d79aa9eb4af02853efa95adb33911d1f90d Mon Sep 17 00:00:00 2001 From: Esinko <34211401+Esinko@users.noreply.github.com> Date: Sun, 18 Dec 2022 14:28:55 +0200 Subject: [PATCH] fix: correctly set location header --- src/routes/members.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/routes/members.js b/src/routes/members.js index 49ef019..ee6d546 100644 --- a/src/routes/members.js +++ b/src/routes/members.js @@ -24,9 +24,7 @@ router.get("/", cookieParser(), async (req, res) => { const session = await database.UserInfo.getWithSessionCode(req.cookies?.code) if (!session || !session.membersPageSession || !session.membersPageSession.timestamp) return res.status(400).send("Permission denied.") if (session.membersPageSession.timestamp + sessionExpiry < new Date().getTime()) { - return res.status(307, { - Location: "testausserveri.fi?relog=1" - }).end() + return res.status(307).setHeader("Location", "testausserveri.fi?relog=1").end() } // Session is valid