Fix ws service not load origin from config #469

This commit is contained in:
Alexey Khit
2023-06-16 15:07:38 +03:00
parent 05a2f53b67
commit e5e899450f
+3
View File
@@ -2,6 +2,7 @@ package ws
import (
"github.com/AlexxIT/go2rtc/internal/api"
"github.com/AlexxIT/go2rtc/internal/app"
"github.com/gorilla/websocket"
"github.com/rs/zerolog/log"
"net/http"
@@ -18,6 +19,8 @@ func Init() {
} `yaml:"api"`
}
app.LoadConfig(&cfg)
initWS(cfg.Mod.Origin)
api.HandleFunc("api/ws", apiWS)