express-session: Set a finite cookie lifetime

This commit is contained in:
Richard Hansen 2021-12-22 23:42:19 -05:00
parent ec10700dff
commit 023e58cfe6
4 changed files with 27 additions and 1 deletions

View file

@ -186,6 +186,7 @@ exports.restartServer = async () => {
// cleaner :)
name: 'express_sid',
cookie: {
maxAge: settings.cookie.sessionLifetime || null, // Convert 0 to null.
sameSite: settings.cookie.sameSite,
// The automatic express-session mechanism for determining if the application is being served