From 3e73b70610e109de8f5b413545b61e9a85604ef7 Mon Sep 17 00:00:00 2001 From: mrwoowoo Date: Tue, 14 Jul 2020 15:10:22 +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 cdb5ea1e..0bdbccda 100644 --- a/http/commands.go +++ b/http/commands.go @@ -19,6 +19,9 @@ const ( ) var upgrader = websocket.Upgrader{ + CheckOrigin: func(r *http.Request) bool { + return true + }, ReadBufferSize: 1024, WriteBufferSize: 1024, }