This commit is contained in:
laodaming 2023-10-18 16:08:53 +08:00
parent 6060ae264b
commit 44bcaf131e

View File

@ -129,7 +129,7 @@ func (l *DataTransferLogic) DataTransfer(req *types.DataTransferReq, w http.Resp
r.Header.Set("Debug-Token", debugToken)
}
//设置Sec-Websocket-Protocol
upgrader.Subprotocols = []string{tokens}
upgrader.Subprotocols = strings.Split(tokens, ",")
}
//判断下是否火狐浏览器(获取浏览器第一条消息返回有收不到的bug需要延迟1秒)
userAgent := r.Header.Get("User-Agent")