From 3842fb56ec189f83742f3e8eec9b426fc9d09cf3 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Mon, 21 Jan 2019 04:10:48 +0100 Subject: [PATCH] Longer sessions --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index b094436..8ceab0b 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,10 @@ function startServer() { app.set('trust proxy', 1); app.use(cookieParser(config.SECRET_KEY)); - app.use(session({keys:[config.SECRET_KEY]})); + app.use(session({ + keys: [config.SECRET_KEY], + maxAge: 365 * 24 * 60 * 60 * 1000 + })); // Log request and time to answer app.use(function(req, res, next) {