1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: default maxAge for session set to two days

Unleash will now extend the session once every hour as long as
the user keeps the browser tab open within two days.
This commit is contained in:
Ivar Conradi Østhus 2020-10-02 16:34:16 +02:00
parent ce0c66d127
commit 34a7c2b244

View File

@ -7,7 +7,7 @@ const { publicFolder } = require('unleash-frontend');
const { defaultLogProvider, validateLogProvider } = require('./logger'); const { defaultLogProvider, validateLogProvider } = require('./logger');
const version = require('./util/version'); const version = require('./util/version');
const THIRTY_DAYS = 30 * 24 * 60 * 60 * 1000; const TWO_DAYS = 2 * 24 * 60 * 60 * 1000;
function defaultDatabaseUrl() { function defaultDatabaseUrl() {
if (process.env.DATABASE_URL_FILE) { if (process.env.DATABASE_URL_FILE) {
@ -44,7 +44,7 @@ function defaultOptions() {
extendedPermissions: false, extendedPermissions: false,
publicFolder, publicFolder,
enableRequestLogger: false, enableRequestLogger: false,
sessionAge: THIRTY_DAYS, sessionAge: TWO_DAYS,
adminAuthentication: process.env.ADMIN_AUTHENTICATION || 'unsecure', adminAuthentication: process.env.ADMIN_AUTHENTICATION || 'unsecure',
ui: {}, ui: {},
importFile: undefined, importFile: undefined,