Browse Source

Force origin test to always pass. Closes #2003

pull/2027/head
Gabe Kangas 3 years ago
parent
commit
c40eaa47e9
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA
  1. 7
      core/chat/chatclient.go

7
core/chat/chatclient.go

@ -3,6 +3,7 @@ package chat @@ -3,6 +3,7 @@ package chat
import (
"bytes"
"encoding/json"
"net/http"
"sync"
"time"
@ -60,6 +61,12 @@ const ( @@ -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 (

Loading…
Cancel
Save