Allow websocket connections from all origins

This commit is contained in:
Ken-Håvard Lieng 2015-05-11 05:13:35 +02:00
parent 7aae7685c5
commit cb4b5e4f6f
2 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,9 @@ var (
upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool {
return true
},
}
)

View File

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