From 3e50addb2d88a608d7d44995a6265be0cea6aab6 Mon Sep 17 00:00:00 2001 From: nom3ad <19239479+nom3ad@users.noreply.github.com> Date: Thu, 2 May 2024 22:03:20 +0530 Subject: [PATCH] wasm/js: correctly handle non standard https port for custom control server websocket url Signed-off-by: nom3ad <19239479+nom3ad@users.noreply.github.com> --- control/controlhttp/client_js.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/control/controlhttp/client_js.go b/control/controlhttp/client_js.go index 7ad596366..5195b3bd1 100644 --- a/control/controlhttp/client_js.go +++ b/control/controlhttp/client_js.go @@ -35,6 +35,9 @@ func (d *Dialer) Dial(ctx context.Context) (*ClientConn, error) { wsScheme = "ws" host = net.JoinHostPort(host, d.HTTPPort) } + if d.HTTPSPort != "" && d.HTTPSPort != "443" { + host = net.JoinHostPort(host, d.HTTPSPort) + } wsURL := &url.URL{ Scheme: wsScheme, Host: host,