Fix SessionMaxAge condition to correctly apply valid values

This commit is contained in:
exterr2f 2025-02-14 11:41:34 +01:00
parent 86d85f12be
commit 43cb1f1bff

View File

@ -88,7 +88,7 @@ func Init() {
authInstance.sessionStore = sessions.NewCookieStore(bytes)
}
if d, err := time.ParseDuration(config.Keys.SessionMaxAge); err != nil {
if d, err := time.ParseDuration(config.Keys.SessionMaxAge); err == nil {
authInstance.SessionMaxAge = d
}