mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
feat(session_parser): use seconds for setting maxAge and update default value to 21 days
21 days was used in the login route previously, when "remember me" was set
This commit is contained in:
@@ -12,11 +12,11 @@ const sessionParser = session({
|
||||
cookie: {
|
||||
path: config.Session.cookiePath,
|
||||
httpOnly: true,
|
||||
maxAge: config.Session.cookieMaxAge
|
||||
maxAge: config.Session.cookieMaxAge * 1000 // needs value in milliseconds
|
||||
},
|
||||
name: "trilium.sid",
|
||||
store: new FileStore({
|
||||
ttl: config.Session.cookieMaxAge / 1000, // needs value in seconds
|
||||
ttl: config.Session.cookieMaxAge,
|
||||
path: `${dataDir.TRILIUM_DATA_DIR}/sessions`
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user