aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-06-26 21:20:22 +0530
committerBobby <[email protected]>2022-06-26 21:20:22 +0530
commitd70a2c9397d25296021871ac088a28054923e970 (patch)
treeae7ba1f080bcaec720410fe15427285ad138344c
parent5cc36e5144e6e3bba259a837fa06321c547f49d8 (diff)
downloadthatcomputerscientist-d70a2c9397d25296021871ac088a28054923e970.tar.xz
thatcomputerscientist-d70a2c9397d25296021871ac088a28054923e970.zip
fix2: cookie logging out
-rw-r--r--routes/auth.routes.js4
-rw-r--r--server.js1
2 files changed, 1 insertions, 4 deletions
diff --git a/routes/auth.routes.js b/routes/auth.routes.js
index 9615aa86..d4b40af0 100644
--- a/routes/auth.routes.js
+++ b/routes/auth.routes.js
@@ -9,9 +9,7 @@ const validationString = process.env.AUTHORIZATION_STRING;
const connectionURL = process.env.DATABASE_URL;
router.get("/logout", (req, res) => {
- res.clearCookie("token", {
- domain: require("yaml").parse(require("fs").readFileSync("site.config.yml", "utf8")).domain,
- });
+ res.clearCookie("token");
res.redirect(req.get("referer"));
});
diff --git a/server.js b/server.js
index 1662868b..94655286 100644
--- a/server.js
+++ b/server.js
@@ -20,7 +20,6 @@ app.use(
expressSession({
cookie: {
maxAge: 30 * 24 * 60 * 60 * 1000,
- domain: require("yaml").parse(require("fs").readFileSync("site.config.yml", "utf8")).domain,
},
secret: process.env.AUTHORIZATION_STRING,
resave: true,