From c4df31dcd00d7bba0eb0430a6ca067601a23109f Mon Sep 17 00:00:00 2001 From: mrwoowoo Date: Tue, 14 Jul 2020 14:52:13 +0800 Subject: [PATCH] fix websocket cross domain problem fix websocket cross domain problem --- http/commands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http/commands.go b/http/commands.go index f6371b7d..89c33947 100644 --- a/http/commands.go +++ b/http/commands.go @@ -14,6 +14,9 @@ import ( ) var upgrader = websocket.Upgrader{ + CheckOrigin: func(r *http.Request) bool { + return true + }, ReadBufferSize: 1024, WriteBufferSize: 1024, }