From e5dbdd77af44e73622039dfa7a5a9a297248d2c7 Mon Sep 17 00:00:00 2001 From: zhengmingfu Date: Mon, 31 May 2021 14:06:04 +0800 Subject: [PATCH] fix: cannot set SessionIDPrefix through config --- server/web/config.go | 1 + server/web/hooks.go | 1 + 2 files changed, 2 insertions(+) diff --git a/server/web/config.go b/server/web/config.go index d89c59cb..c8b5bc51 100644 --- a/server/web/config.go +++ b/server/web/config.go @@ -116,6 +116,7 @@ type SessionConfig struct { SessionEnableSidInHTTPHeader bool // enable store/get the sessionId into/from http headers SessionNameInHTTPHeader string SessionEnableSidInURLQuery bool // enable get the sessionId from Url Query params + SessionIDPrefix string } // LogConfig holds Log related config diff --git a/server/web/hooks.go b/server/web/hooks.go index 438496a0..d44f477f 100644 --- a/server/web/hooks.go +++ b/server/web/hooks.go @@ -63,6 +63,7 @@ func registerSession() error { conf.EnableSidInHTTPHeader = BConfig.WebConfig.Session.SessionEnableSidInHTTPHeader conf.SessionNameInHTTPHeader = BConfig.WebConfig.Session.SessionNameInHTTPHeader conf.EnableSidInURLQuery = BConfig.WebConfig.Session.SessionEnableSidInURLQuery + conf.SessionIDPrefix = BConfig.WebConfig.Session.SessionIDPrefix } else { if err = json.Unmarshal([]byte(sessionConfig), conf); err != nil { return err