mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 17:56:30 -05:00
Add rolling option on session to reset maxAge on every response to extend session life
This commit is contained in:
parent
3c7d39c52d
commit
f7a4f8f8c2
1 changed files with 2 additions and 1 deletions
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 a new issue