mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
feat(config): add Session.cookieMaxAge
allows users to control how long their session will be live, before it expires and they are forced to login again defaults to 1 day ("24 * 60 * 60 * 1000") as previously set in sessionParser
This commit is contained in:
parent
69a6739d1f
commit
53576f5578
@ -36,6 +36,7 @@ trustedReverseProxy=false
|
||||
# e.g. if you have https://your-domain.com/triliumNext/instanceA and https://your-domain.com/triliumNext/instanceB
|
||||
# you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance
|
||||
cookiePath=/
|
||||
cookieMaxAge=
|
||||
|
||||
[Sync]
|
||||
#syncServerHost=
|
||||
|
@ -34,6 +34,7 @@ export interface TriliumConfig {
|
||||
};
|
||||
Session: {
|
||||
cookiePath: string;
|
||||
cookieMaxAge: number;
|
||||
}
|
||||
Sync: {
|
||||
syncServerHost: string;
|
||||
@ -81,7 +82,10 @@ const config: TriliumConfig = {
|
||||
|
||||
Session: {
|
||||
cookiePath:
|
||||
process.env.TRILIUM_SESSION_COOKIEPATH || iniConfig?.Session?.cookiePath || "/"
|
||||
process.env.TRILIUM_SESSION_COOKIEPATH || iniConfig?.Session?.cookiePath || "/",
|
||||
|
||||
cookieMaxAge:
|
||||
process.env.TRILIUM_SESSION_COOKIEMAXAGE || iniConfig?.Session?.cookieMaxAge || "24 * 60 * 60 * 1000" // 24 hours in Milliseconds
|
||||
},
|
||||
|
||||
Sync: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user