From 3863617056fed4b0cc340d7119f30f259ca2fdc9 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 30 Apr 2015 00:24:39 -0700 Subject: [PATCH] allow websocket connections cross-origin --- server/ws.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/ws.go b/server/ws.go index becc934f0..ccbbe2cba 100644 --- a/server/ws.go +++ b/server/ws.go @@ -2,6 +2,7 @@ package server import ( "fmt" + "net/http" "net/url" "strconv" "time" @@ -29,6 +30,7 @@ const ( var upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, + CheckOrigin: func(r *http.Request) bool { return true }, } // GetEvents will upgrade the connection to a Websocket and will stream