From cb4b5e4f6fb88170f9a32a8725706be6ec26629d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Mon, 11 May 2015 05:13:35 +0200 Subject: [PATCH] Allow websocket connections from all origins --- server/server.go | 3 +++ storage/storage.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/server/server.go b/server/server.go index a72d4a76..da70e0be 100644 --- a/server/server.go +++ b/server/server.go @@ -23,6 +23,9 @@ var ( upgrader = websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, + CheckOrigin: func(r *http.Request) bool { + return true + }, } ) diff --git a/storage/storage.go b/storage/storage.go index 27959b05..6fc1f291 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -32,6 +32,8 @@ func init() { func Initialize() { var err error + log.Println("Storing data at", appDir) + os.Mkdir(appDir, 0777) os.Mkdir(path.Join(appDir, "logs"), 0777)