From cfc5f5b157b0473b86254c6fd251a654425ce8dc Mon Sep 17 00:00:00 2001 From: Saul Shanabrook Date: Tue, 25 Aug 2015 20:34:18 -0400 Subject: [PATCH] Add troubleshooting for 403 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 3980c4e..afc39b6 100644 --- a/README.md +++ b/README.md @@ -66,3 +66,13 @@ func main() { ### [More examples](https://github.com/olahol/melody/tree/master/examples) ## [Documentation](https://godoc.org/github.com/olahol/melody) + + +## FAQ + +If you are getting a `403` when trying to connect to your websocket you can [change allow all origin hosts](http://godoc.org/github.com/gorilla/websocket#hdr-Origin_Considerations): + +```go +m := melody.New() +m.Upgrader.CheckOrigin = func(r *http.Request) bool { return true } +```