enhance(session): increase default cookie ttl to 60 days

This commit is contained in:
HFO4 2022-11-21 19:09:54 +08:00
parent db6681f448
commit 6b63195d28

View file

@ -30,7 +30,7 @@ func Session(secret string) gin.HandlerFunc {
// Also set Secure: true if using SSL, you should though
// TODO:same-site policy
Store.Options(sessions.Options{HttpOnly: true, MaxAge: 7 * 86400, Path: "/"})
Store.Options(sessions.Options{HttpOnly: true, MaxAge: 60 * 86400, Path: "/"})
return sessions.Sessions("cloudreve-session", Store)
}