fix
This commit is contained in:
parent
724b842167
commit
2c41f59064
|
@ -87,9 +87,9 @@ func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request)
|
|||
//有token是正常用户,无则是白板用户,也可以连接
|
||||
if token != "" {
|
||||
r.Header.Set("Authorization", "Bearer "+token)
|
||||
}
|
||||
//设置Sec-Websocket-Protocol
|
||||
upgrader.Subprotocols = []string{token}
|
||||
}
|
||||
//升级websocket
|
||||
conn, err := upgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user