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

this avoids having "unused" dead session on the filesystem
This commit is contained in:
Panagiotis Papadopoulos 2025-02-10 19:59:40 +01:00
parent 4e23b5193d
commit 04827c0ce1

View File

@ -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`
})
});