fix(session_parser): FileStore ttl should be ideally the same as session cookies maxAge

this avoids having "unused" dead session on the filesystem
pull/1156/head
Panagiotis Papadopoulos 2025-02-10 19:59:40 +07:00
parent 4e23b5193d
commit 04827c0ce1
1 changed files with 1 additions and 1 deletions

@ -16,7 +16,7 @@ const sessionParser = session({
},
name: "trilium.sid",
store: new FileStore({
ttl: 30 * 24 * 3600,
ttl: config.Session.cookieMaxAge / 1000, // needs value in seconds
path: `${dataDir.TRILIUM_DATA_DIR}/sessions`
})
});