Skip to content

Commit

Permalink
handling cors origin
Browse files Browse the repository at this point in the history
  • Loading branch information
purehyperbole committed Jun 21, 2018
1 parent 44b369f commit 008622c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import (
"github.com/r3labs/broadcast"
)

var upgrader = websocket.Upgrader{}
var upgrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
return true
},
}

func handler(w http.ResponseWriter, r *http.Request) {
c, err := upgrader.Upgrade(w, r, nil)
Expand Down

0 comments on commit 008622c

Please sign in to comment.