This commit is contained in:
laodaming 2023-10-11 19:10:03 +08:00
parent 7cc1addfe4
commit 9dad383b03

View File

@ -122,6 +122,7 @@ func (l *DataTransferLogic) DataTransfer(req *types.DataTransferReq, w http.Resp
//把子协议携带的token设置到标准token头信息中
token := r.Header.Get("Sec-Websocket-Protocol")
oldWid := req.Wid
oldWid = strings.ReplaceAll(oldWid, " ", "+")
//有token是正常用户无则是白板用户也可以连接
if token != "" {
r.Header.Set("Authorization", "Bearer "+token)