From c6f2599faaa8a518e2eca67a1a3413e3fdd49794 Mon Sep 17 00:00:00 2001 From: Joshua Noble Date: Tue, 7 Jan 2025 16:18:59 -0500 Subject: [PATCH] Support HTTPS when using a specific API instance --- http/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/http/client.go b/http/client.go index 14ae8e4c..a5d914ac 100644 --- a/http/client.go +++ b/http/client.go @@ -85,7 +85,9 @@ func ClientWithRawAbsPath(rawAbsPath bool) ClientOpt { // NewClient constructs a new HTTP-backed command executor. func NewClient(address string, opts ...ClientOpt) cmds.Executor { - if !strings.HasPrefix(address, "http://") { + if strings.Contains(address, "443") { + address = "https://" + address + } else if !strings.HasPrefix(address, "http://") { address = "http://" + address }