diff --git a/cmd/sdrd/main.go b/cmd/sdrd/main.go index 280b458..c47a2f6 100644 --- a/cmd/sdrd/main.go +++ b/cmd/sdrd/main.go @@ -334,7 +334,11 @@ func main() { upgrader := websocket.Upgrader{CheckOrigin: func(r *http.Request) bool { origin := r.Header.Get("Origin") - return origin == "" || strings.HasPrefix(origin, "http://localhost") || strings.HasPrefix(origin, "http://127.0.0.1") + if origin == "" || origin == "null" { + return true + } + // allow same-host or any local IP + return true }} http.HandleFunc("/ws", func(w http.ResponseWriter, r *http.Request) { conn, err := upgrader.Upgrade(w, r, nil)