var __upgrader = websocket.Upgrader {
ReadBufferSize:1024,
WriteBufferSize: 1024,
// 新增如下代码,解决跨域问题,即403错误
CheckOrigin: func(r *http.Request) bool {
return true
},
}
var __upgrader = websocket.Upgrader {
ReadBufferSize:1024,
WriteBufferSize: 1024,
// 新增如下代码,解决跨域问题,即403错误
CheckOrigin: func(r *http.Request) bool {
return true
},
}