Skip to content

Commit c6f2599

Browse files
committed
Support HTTPS when using a specific API instance
1 parent 2432d3e commit c6f2599

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

http/client.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ func ClientWithRawAbsPath(rawAbsPath bool) ClientOpt {
8585

8686
// NewClient constructs a new HTTP-backed command executor.
8787
func NewClient(address string, opts ...ClientOpt) cmds.Executor {
88-
if !strings.HasPrefix(address, "http://") {
88+
if strings.Contains(address, "443") {
89+
address = "https://" + address
90+
} else if !strings.HasPrefix(address, "http://") {
8991
address = "http://" + address
9092
}
9193

0 commit comments

Comments
 (0)