fix
This commit is contained in:
parent
af81ea10f0
commit
f6e70d0386
@ -117,7 +117,6 @@ type wsConnectItem struct {
|
|||||||
// 请求建立连接,升级websocket协议
|
// 请求建立连接,升级websocket协议
|
||||||
func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request) {
|
func (l *DataTransferLogic) DataTransfer(w http.ResponseWriter, r *http.Request) {
|
||||||
origin := r.Header.Get("Origin")
|
origin := r.Header.Get("Origin")
|
||||||
fmt.Println("*************:", origin)
|
|
||||||
//判断是不是允许的host
|
//判断是不是允许的host
|
||||||
upgrader.CheckOrigin = func(r *http.Request) bool {
|
upgrader.CheckOrigin = func(r *http.Request) bool {
|
||||||
if _, ok := mapAllowOrigin[origin]; !ok {
|
if _, ok := mapAllowOrigin[origin]; !ok {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user