fix: persist cookie for language choice (#2395)
Fixes #2394. Adds back a max cookie age so that the language choice isn't forgotten after browser is closed and reopened.
This commit is contained in:
Родитель
ced9461b78
Коммит
89a3a22d36
|
@ -58,6 +58,7 @@ app.use(requestLanguage({
|
|||
languages: Object.keys(i18n.locales),
|
||||
cookie: {
|
||||
name: 'language',
|
||||
options: {maxAge: 30 * 24 * 60 * 60 * 1000},
|
||||
url: '/languages/{language}'
|
||||
}
|
||||
}))
|
||||
|
|
Загрузка…
Ссылка в новой задаче