From 8c406982f32cde166cd5214f9f8999cab2dbbabf Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 12 Dec 2016 19:55:36 -0800 Subject: [PATCH] Added access control header * --- websockets.go | 1 + 1 file changed, 1 insertion(+) 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)