aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-07-09 19:57:29 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-07-09 19:57:29 -0400
commite9189e389adbbbc6c13281b4fa4ea2a5c0076275 (patch)
tree96ac0aee0204d9e404f7fd46dbabb8fc5508895d /src
parent15914700e307a372a1e304955a5244184108a6fa (diff)
clean up
Diffstat (limited to 'src')
-rw-r--r--src/server/index.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 5ecbfa41a..554bdad17 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -70,7 +70,7 @@ app.use(session({
secret: "64d6866242d3b5a5503c675b32c9605e4e90478e9b77bcf2bc",
resave: true,
cookie: { maxAge: 7 * 24 * 60 * 60 * 1000 },
- saveUninitialized: false,
+ saveUninitialized: true,
store: new MongoStore({ url: 'mongodb://localhost:27017/Dash' })
}));
@@ -112,8 +112,7 @@ function addSecureRoute(method: Method,
if (req.user) {
handler(req.user, res, req);
} else {
- let target = `http://localhost:${port}${req.originalUrl}`;
- req.session!.target = target;
+ req.session!.target = `http://localhost:${port}${req.originalUrl}`;
onRejection(res, req);
}
};