Add configurable maxAge for session cookie, defaults to 30 days

This commit is contained in:
Alice Gaudon 2020-07-14 15:06:46 +02:00
parent d6266e4396
commit 6885f3da1c
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,8 @@ export default {
session: { session: {
secret: "very_secret_not_known", secret: "very_secret_not_known",
cookie: { cookie: {
secure: false secure: false,
maxAge: 30 * 24 * 3600 * 1000, // 30 days
} }
}, },
mail: { mail: {

View File

@ -22,6 +22,7 @@ export default class SessionComponent extends ApplicationComponent<void> {
cookie: { cookie: {
httpOnly: true, httpOnly: true,
secure: config.get('session.cookie.secure'), secure: config.get('session.cookie.secure'),
maxAge: config.get('session.cookie.maxAge'),
}, },
rolling: true, rolling: true,
})); }));