Browse Source

Add troubleshooting for 403

master
Saul Shanabrook 10 years ago
parent
commit
cfc5f5b157
  1. 10
      README.md

10
README.md

@ -66,3 +66,13 @@ func main() {
### [More examples](https://github.com/olahol/melody/tree/master/examples) ### [More examples](https://github.com/olahol/melody/tree/master/examples)
## [Documentation](https://godoc.org/github.com/olahol/melody) ## [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 }
```
Loading…
Cancel
Save