add session check

This commit is contained in:
landaiqing
2024-10-17 16:21:46 +08:00
parent 5bfca64315
commit b5d88a7ccd
5 changed files with 70 additions and 8 deletions

View File

@@ -21,10 +21,11 @@ func InitSession(client *redis.Client) {
store.Options(sessions.Options{
Path: "/",
//Domain: global.CONFIG.System.Web,
MaxAge: 86400 * 7,
HttpOnly: true,
Secure: true,
SameSite: http.SameSiteLaxMode,
MaxAge: 86400 * 7,
HttpOnly: true,
Secure: true,
Partitioned: true,
SameSite: http.SameSiteLaxMode,
})
global.Session = store
}