diff options
| author | bndw <ben@bdw.to> | 2026-02-13 21:20:50 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-02-13 21:20:50 -0800 |
| commit | 15f9c714a28a062a4ec3a916675dccba98749788 (patch) | |
| tree | fc0210582724b04dfae1428fc0f6024756dc292d /cmd/relay/main.go | |
| parent | 13a6cbfe1036db242583a6af5471b5a21fb223b9 (diff) | |
fix: remove duplicate protocol prefix in WebSocket URL
The template was hardcoding 'ws://' prefix, but when using
--public-url we were already passing 'wss://'. This caused
the URL to display as 'ws://wss://domain/'.
Fix by:
- Removing 'ws://' prefix from template
- Always including protocol in the variable (ws:// or wss://)
- Also add http:// prefix for local development consistency
Diffstat (limited to 'cmd/relay/main.go')
| -rw-r--r-- | cmd/relay/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/relay/main.go b/cmd/relay/main.go index a7daa50..a928238 100644 --- a/cmd/relay/main.go +++ b/cmd/relay/main.go | |||
| @@ -63,8 +63,8 @@ func main() { | |||
| 63 | } else { | 63 | } else { |
| 64 | // Use local addresses for development | 64 | // Use local addresses for development |
| 65 | grpcDisplay = *grpcAddr | 65 | grpcDisplay = *grpcAddr |
| 66 | httpDisplay = *wsAddr | 66 | httpDisplay = "http://" + *wsAddr |
| 67 | wsDisplay = *wsAddr | 67 | wsDisplay = "ws://" + *wsAddr |
| 68 | } | 68 | } |
| 69 | wsHandler.SetIndexData(grpcDisplay, httpDisplay, wsDisplay) | 69 | wsHandler.SetIndexData(grpcDisplay, httpDisplay, wsDisplay) |
| 70 | mux.Handle("/", wsHandler) | 70 | mux.Handle("/", wsHandler) |
