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

pull/1532/head
HFO4 2 years ago
parent db6681f448
commit 6b63195d28

@ -30,7 +30,7 @@ func Session(secret string) gin.HandlerFunc {
// Also set Secure: true if using SSL, you should though // Also set Secure: true if using SSL, you should though
// TODO:same-site policy // 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) return sessions.Sessions("cloudreve-session", Store)
} }

Loading…
Cancel
Save