Allow all websocket origins in development mode

This commit is contained in:
Ken-Håvard Lieng 2016-01-27 18:03:38 +01:00
parent 22d8b8b363
commit 1a7360a573
1 changed files with 6 additions and 0 deletions

View File

@ -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()