This commit is contained in:
laodaming 2023-09-05 14:10:46 +08:00
parent af81ea10f0
commit f6e70d0386

View File

@ -117,7 +117,6 @@ type wsConnectItem struct {
// 请求建立连接升级websocket协议
func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request) {
origin := r.Header.Get("Origin")
fmt.Println("*************:", origin)
//判断是不是允许的host
upgrader.CheckOrigin = func(r *http.Request) bool {
if _, ok := mapAllowOrigin[origin]; !ok {