Skip to content

Commit

Permalink
ws: support cors (cosmos#864)
Browse files Browse the repository at this point in the history
The websocket JSON RPC server did not support CORS. This PR implements
this. Fixes cosmos#436 cosmos#742
  • Loading branch information
tuxcanfly authored May 15, 2023
1 parent 451c950 commit 01e83ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rpc/json/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (h *handler) wsHandler(w http.ResponseWriter, r *http.Request) {
upgrader := websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool { return true },
}

wsc, err := upgrader.Upgrade(w, r, nil)
Expand Down

0 comments on commit 01e83ce

Please sign in to comment.