websocket in api scope.

This commit is contained in:
Miroslav Šedivý 2021-01-29 23:02:29 +01:00
parent 6d59b3feff
commit 57ed35552f

View File

@ -43,7 +43,7 @@ func New(WebSocketManager types.WebSocketManager, ApiManager types.ApiManager, c
router.Route("/api", ApiManager.Route)
router.Get("/ws", func(w http.ResponseWriter, r *http.Request) {
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"))