WS upgrade no returning error.

This commit is contained in:
Miroslav Šedivý 2021-03-16 10:45:22 +01:00
parent 971e3bff4e
commit 58d029f455
3 changed files with 26 additions and 12 deletions

View file

@ -44,7 +44,6 @@ func New(WebSocketManager types.WebSocketManager, ApiManager types.ApiManager, c
router.Route("/api", ApiManager.Route)
router.Get("/api/ws", func(w http.ResponseWriter, r *http.Request) {
//nolint
WebSocketManager.Upgrade(w, r, func(r *http.Request) bool {
return conf.AllowOrigin(r.Header.Get("Origin"))
})