mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-12 20:02:28 +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
|
# 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
|
# you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance
|
||||||
cookiePath=/
|
cookiePath=/
|
||||||
|
cookieMaxAge=
|
||||||
|
|
||||||
[Sync]
|
[Sync]
|
||||||
#syncServerHost=
|
#syncServerHost=
|
||||||
|
@ -34,6 +34,7 @@ export interface TriliumConfig {
|
|||||||
};
|
};
|
||||||
Session: {
|
Session: {
|
||||||
cookiePath: string;
|
cookiePath: string;
|
||||||
|
cookieMaxAge: number;
|
||||||
}
|
}
|
||||||
Sync: {
|
Sync: {
|
||||||
syncServerHost: string;
|
syncServerHost: string;
|
||||||
@ -81,7 +82,10 @@ const config: TriliumConfig = {
|
|||||||
|
|
||||||
Session: {
|
Session: {
|
||||||
cookiePath:
|
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: {
|
Sync: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user