From 1a7360a57343d74e4dff8c736b68416502cc0644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Wed, 27 Jan 2016 18:03:38 +0100 Subject: [PATCH] Allow all websocket origins in development mode --- server/server.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/server.go b/server/server.go index d0d843b2..9720394c 100644 --- a/server/server.go +++ b/server/server.go @@ -30,6 +30,12 @@ func Run() { sessions = newSessionStore() channelStore = storage.NewChannelStore() + if viper.GetBool("dev") { + upgrader.CheckOrigin = func(r *http.Request) bool { + return true + } + } + reconnectIRC() initAuth() initFileServer()