P0 hosted: WebSocket transport must traverse a reverse proxy on the standard HTTPS port #72

Open
opened 2026-09-06 18:32:04 +00:00 by nsaspy · 0 comments
Owner

Problem

frontend/src/control-plane/client.ts#defaultWebSocketUrl hardcodes port 8081: \`${scheme}://``${window.location.hostname}:8081?session=...`. A hosted deployment behind the shared web origin (Cloudflare -> ord-edge -> mallcop -> web Caddy on 443, quasar.starintel.actor) cannot expose a second public port, so the browser can never reach the control-plane WebSocket: the hosted UI is permanently standalone.

The websocket server also binds 127.0.0.1:8081 by default; behind the origin's reverse proxy it needs a path-mapped same-origin route.

Required

  • Client: derive the WS endpoint from configuration injected by the host (e.g. a quasar-control-ws meta tag emitted alongside the existing quasar-session-token), falling back to today's behavior for local/desktop use.
  • Server/host: document and support serving the WS endpoint at a same-origin path (e.g. /control-ws) through the reverse proxy while CLOG keeps serving the SPA.
  • WebSockets must survive the full proxy chain (Cloudflare, mallcop, web Caddy) — connection upgrade headers preserved.

Acceptance

  • A hosted deployment serves SPA + control-plane WS on one origin/port; the UI connects and synchronizes instead of degrading.
  • Local desktop/dev behavior unchanged.
## Problem `frontend/src/control-plane/client.ts#defaultWebSocketUrl` hardcodes port 8081: `\`\`${scheme}://\`\`\${window.location.hostname}:8081?session=...`. A hosted deployment behind the shared web origin (Cloudflare -> ord-edge -> mallcop -> web Caddy on 443, quasar.starintel.actor) cannot expose a second public port, so the browser can never reach the control-plane WebSocket: the hosted UI is permanently standalone. The websocket server also binds 127.0.0.1:8081 by default; behind the origin's reverse proxy it needs a path-mapped same-origin route. ## Required - Client: derive the WS endpoint from configuration injected by the host (e.g. a `quasar-control-ws` meta tag emitted alongside the existing `quasar-session-token`), falling back to today's behavior for local/desktop use. - Server/host: document and support serving the WS endpoint at a same-origin path (e.g. `/control-ws`) through the reverse proxy while CLOG keeps serving the SPA. - WebSockets must survive the full proxy chain (Cloudflare, mallcop, web Caddy) — connection upgrade headers preserved. ## Acceptance - A hosted deployment serves SPA + control-plane WS on one origin/port; the UI connects and synchronizes instead of degrading. - Local desktop/dev behavior unchanged.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/quasar#72
No description provided.