Skip to content

Commit

Permalink
Force origin test to always pass. Closes #2003
Browse files Browse the repository at this point in the history
  • Loading branch information
gabek committed Aug 2, 2022
1 parent 643b540 commit c40eaa4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/chat/chatclient.go
Expand Up @@ -3,6 +3,7 @@ package chat
import (
"bytes"
"encoding/json"
"net/http"
"sync"
"time"

Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit c40eaa4

Please sign in to comment.