fix: allow any origin on WS IPC (127.0.0.1-only bind is the guard)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Fredrik Johansson
2026-06-22 22:08:44 +02:00
parent ff14e955ea
commit 06f9359da8

View File

@@ -33,7 +33,7 @@ func RunWS(mgr *netmgr.Manager, wsPort int) error {
log.Printf("ipc: WS listening on %s", addr) log.Printf("ipc: WS listening on %s", addr)
return http.ListenAndServe(addr, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return http.ListenAndServe(addr, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
conn, err := websocket.Accept(w, r, &websocket.AcceptOptions{ conn, err := websocket.Accept(w, r, &websocket.AcceptOptions{
OriginPatterns: []string{"localhost:*", "127.0.0.1:*"}, OriginPatterns: []string{"*"},
}) })
if err != nil { if err != nil {
log.Printf("ipc: ws accept: %v", err) log.Printf("ipc: ws accept: %v", err)