fix(live): surface control WebSocket construction failure #56
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VAPP-45-surface-control-ws-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The live control channel's Conn::open swallowed a failed WebSocket constructor with
WebSocket::new(ws_url).ok()?, returning None silently. When VERVAIN_SERVER_PUBLIC_URL is http://, get_control_token mints a ws:// url, and an insecure ws:// socket on the https SPA page is mixed-content-blocked: the constructor throws SecurityError, the swallow hid it, and the statusbar read "disconnected" with no diagnostic. VAPP-42 fixed this for the relay paths (terminal/files/desktop) but missed the control channel in live.rs.Conn::open now logs the offending url (single-use auth token redacted via the shared redact_auth helper) and the error to the console and calls out the ws://-on-https mixed-content cause, mirroring the relay-WS fix, instead of returning None silently. The README note on VERVAIN_SERVER_PUBLIC_URL now spells out that an http:// value yields insecure ws:// sockets a secure SPA cannot open.
#VAPP-45