From 1e1a479ab436be74cd18c789b020eda3c4e63231 Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Fri, 26 Sep 2025 14:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/router.go | 2 +- internal/services/chat.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/biz/router.go b/internal/biz/router.go index be1358d..f52a040 100644 --- a/internal/biz/router.go +++ b/internal/biz/router.go @@ -297,7 +297,7 @@ func (r *AiRouterBiz) handleKnowle(channel chan entitys.Response, c *websocket.C } // 通过session 找到知识库session - session := c.Headers("X-Session", "") + session := c.Query("x-session", "") if len(session) == 0 { return errors.SessionNotFound } diff --git a/internal/services/chat.go b/internal/services/chat.go index 36c89e0..7143e7d 100644 --- a/internal/services/chat.go +++ b/internal/services/chat.go @@ -100,7 +100,7 @@ func (h *ChatService) Chat(c *websocket.Conn) { //简单协议:bind: if c.Headers("Sec-Websocket-Protocol") == "bind" && req.SessionID != "" { - uid := c.Headers("X-Session") + uid := c.Query("x-session") _ = h.Gw.BindUid(clientID, req.SessionID) log.Printf("bind %s -> uid:%s\n", clientID, uid) }