From c40eaa47e9c04729db2f59d1c13c2a8c478d459f Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 2 Aug 2022 13:03:11 -0700 Subject: [PATCH] Force origin test to always pass. Closes #2003 --- core/chat/chatclient.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/chat/chatclient.go b/core/chat/chatclient.go index fdcd77e38..3e02e7158 100644 --- a/core/chat/chatclient.go +++ b/core/chat/chatclient.go @@ -3,6 +3,7 @@ package chat import ( "bytes" "encoding/json" + "net/http" "sync" "time" @@ -60,6 +61,12 @@ const ( var upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, + + // Override default origin check to allow all clients, even those that + // do not match our server. + CheckOrigin: func(r *http.Request) bool { + return true + }, } var (