olahol / melody

:notes: Minimalist websocket framework for Go
BSD 2-Clause "Simplified" License
3.75k stars 366 forks source link

403 error with localhost #23

Closed ianberdin closed 7 years ago

ianberdin commented 7 years ago

Please add this:

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

Source

ianberdin commented 7 years ago

Yes, I can do this:

mrouter.Upgrader.CheckOrigin = func(r *http.Request) bool {return true}

But by default will be better.

olahol commented 7 years ago

This is now the default. Thanks @happierall.