fix
This commit is contained in:
parent
b8ca7360b1
commit
62afaeda07
|
@ -80,6 +80,7 @@ type wsConnectItem struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request) {
|
func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request) {
|
||||||
|
//把子协议携带的token设置到标准token头信息中
|
||||||
r.Header.Set("Authorization", "Bearer "+r.Header.Get("Sec-Websocket-Protocol"))
|
r.Header.Set("Authorization", "Bearer "+r.Header.Get("Sec-Websocket-Protocol"))
|
||||||
//设置Sec-Websocket-Protocol
|
//设置Sec-Websocket-Protocol
|
||||||
upgrade.Subprotocols = []string{r.Header.Get("Sec-Websocket-Protocol")}
|
upgrade.Subprotocols = []string{r.Header.Get("Sec-Websocket-Protocol")}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user