diff --git a/websockets.go b/websockets.go index f05d728..0e31651 100644 --- a/websockets.go +++ b/websockets.go @@ -15,6 +15,7 @@ var wsupgrader = websocket.Upgrader{ } func wshandler(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") conn, err := wsupgrader.Upgrade(w, r, nil) if err != nil { fmt.Println("Failed to set websocket upgrade: %+v", err)