fix(web): WebSocket scheme follows page protocol (wss:// under TLS) #150

Merged
vxfemboy merged 1 commit from fix/web-ws-tls-scheme into main 2026-08-01 18:21:36 +00:00
Owner

The dashboard hardcoded ws://, so emry web --tls-cert served over HTTPS had its live stream blocked as mixed content (chart never updated). Now derives wss:///ws:// from location.protocol. Plaintext behaviour unchanged; index_serves_html test updated. Follow-up flagged during the #149 review.

The dashboard hardcoded `ws://`, so `emry web --tls-cert` served over HTTPS had its live stream blocked as mixed content (chart never updated). Now derives `wss://`/`ws://` from `location.protocol`. Plaintext behaviour unchanged; index_serves_html test updated. Follow-up flagged during the #149 review.
fix(web): derive WebSocket scheme from page protocol (wss:// under TLS)
Some checks failed
CI / helm (pull_request) Successful in 38s
CI / rust (pull_request) Failing after 5m18s
CI / python (3.11) (pull_request) Successful in 6m15s
CI / python (3.10) (pull_request) Successful in 6m18s
CI / python (3.12) (pull_request) Successful in 6m23s
CI / pre-commit (pull_request) Failing after 7m6s
CI / wheels (pull_request) Successful in 7m41s
CI / torch (pull_request) Successful in 7m46s
490cae4856
The dashboard hardcoded `ws://${location.host}/ws`, so when `emry web` is
served over HTTPS (`--tls-cert`/`--tls-key`) the browser blocks the live stream
as mixed content and the chart never updates. Derive the scheme from
`location.protocol`: `wss://` on an https page, `ws://` otherwise. Plaintext
(http) behaviour is unchanged. Updated the index_serves_html test to assert the
scheme-following wiring instead of a literal ws://.
Sign in to join this conversation.
No reviewers
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
femboy/emry!150
No description provided.