diff --git a/config/default.ts b/config/default.ts index a41482a..9888df4 100644 --- a/config/default.ts +++ b/config/default.ts @@ -25,7 +25,8 @@ export default { session: { secret: "very_secret_not_known", cookie: { - secure: false + secure: false, + maxAge: 30 * 24 * 3600 * 1000, // 30 days } }, mail: { diff --git a/src/components/SessionComponent.ts b/src/components/SessionComponent.ts index c1993dd..d06e975 100644 --- a/src/components/SessionComponent.ts +++ b/src/components/SessionComponent.ts @@ -22,6 +22,7 @@ export default class SessionComponent extends ApplicationComponent { cookie: { httpOnly: true, secure: config.get('session.cookie.secure'), + maxAge: config.get('session.cookie.maxAge'), }, rolling: true, }));