check origin unnecessary for demo

This commit is contained in:
Your Name 2020-01-20 14:54:56 +00:00
parent 2f16eac316
commit 24071f9247
1 changed files with 5 additions and 2 deletions

View File

@ -42,12 +42,15 @@ func load_data(filename string) []dashData {
return d
}
var upgrader = websocket.Upgrader{}
var upgrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
return true
},
}
func main() {
http.HandleFunc("/ws", subscribe)
log.Fatal(http.ListenAndServe("localhost:9888", nil))
}
func subscribe(w http.ResponseWriter, r *http.Request) {