update comment

This commit is contained in:
landaiqing
2024-09-24 01:15:21 +08:00
parent 5cc4294268
commit 5d86914cb7
8 changed files with 452 additions and 39 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/gorilla/sessions"
"github.com/rbcervilla/redisstore/v9"
"github.com/redis/go-redis/v9"
"net/http"
"schisandra-cloud-album/common/constant"
"schisandra-cloud-album/global"
)
@@ -20,7 +21,10 @@ func InitSession(client *redis.Client) {
store.Options(sessions.Options{
Path: "/",
//Domain: global.CONFIG.System.Web,
MaxAge: 86400 * 7,
MaxAge: 86400 * 7,
HttpOnly: true,
Secure: true,
SameSite: http.SameSiteLaxMode,
})
global.Session = store
}