mirror of https://github.com/status-im/codimd.git
Add rolling option on session to reset maxAge on every response to extend session life
This commit is contained in:
parent
3c7d39c52d
commit
f7a4f8f8c2
3
app.js
3
app.js
|
@ -100,9 +100,10 @@ app.use(session({
|
||||||
secret: config.sessionsecret,
|
secret: config.sessionsecret,
|
||||||
resave: false, //don't save session if unmodified
|
resave: false, //don't save session if unmodified
|
||||||
saveUninitialized: true, //always create session to ensure the origin
|
saveUninitialized: true, //always create session to ensure the origin
|
||||||
|
rolling: true, // reset maxAge on every response
|
||||||
cookie: {
|
cookie: {
|
||||||
maxAge: config.sessionlife,
|
maxAge: config.sessionlife,
|
||||||
expires: new Date(Date.now() + config.sessionlife),
|
expires: new Date(Date.now() + config.sessionlife)
|
||||||
},
|
},
|
||||||
store: sessionStore
|
store: sessionStore
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue