结构修改

This commit is contained in:
renzhiyuan 2025-09-26 14:20:21 +08:00
parent 50954b4518
commit 1e1a479ab4
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -100,7 +100,7 @@ func (h *ChatService) Chat(c *websocket.Conn) {
//简单协议bind:<uid>
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)
}