From 4276e4bec39a85a30648af29e370d6949515abd0 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 * Former-commit-id: a426e27bcbc533a15c2a2b0459ed799fadc2a787 [formerly 800b5f52810f6ef875f96c754cb42185a50badc0] [formerly 01b72cb3f3ae23f101d6a6d8273b9b426ce0b7da [formerly 2cf48e3280c86a89c8a9d95b68ee8c727772bf23 [formerly 8c406982f32cde166cd5214f9f8999cab2dbbabf]]] Former-commit-id: 95422abadd277c5c5b06257ff15ea35b1fc46740 [formerly 3a2861c4f90c1aa0794840f44af0a1c1a6ecfb49] Former-commit-id: 7cce559cf40c44ea3695eba5ec9f8c8a2ef4376a Former-commit-id: bbb33c1f729053b43e9a062c22f27fca8fb1b0c4 --- 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)