echox
echox copied to clipboard
Websocket Example: Error for checkOrigin
For: echox/website/content/cookbook/websocket.md
The example usage of Gorilla WS, will lead to a websocket origin not allowed error if you wanna use it to a websocket client.
I recommend:
var (
upgrader = websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool { return true },
}
)