diff options
author | Wu Cheng-Han | 2016-07-05 16:06:18 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-07-05 16:06:18 +0800 |
commit | f7a4f8f8c2ec5fb138e89f9f87309d784b41af8a (patch) | |
tree | 55adae189f65ee1d731c52722ced96f3e33cafc6 | |
parent | 3c7d39c52dccd7f87ee97c7f59bd2d86ed687bb8 (diff) |
Add rolling option on session to reset maxAge on every response to extend session life
Diffstat (limited to '')
-rw-r--r-- | app.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -100,9 +100,10 @@ app.use(session({ secret: config.sessionsecret, resave: false, //don't save session if unmodified saveUninitialized: true, //always create session to ensure the origin + rolling: true, // reset maxAge on every response cookie: { maxAge: config.sessionlife, - expires: new Date(Date.now() + config.sessionlife), + expires: new Date(Date.now() + config.sessionlife) }, store: sessionStore })); |