From faa0a48c4ec8b589aabc64bd4674e51d59f8aa33 Mon Sep 17 00:00:00 2001 From: Din Music Date: Fri, 29 Nov 2024 10:34:22 +0000 Subject: [PATCH] provider-config: Append port after hostname instead of at the end of URL Signed-off-by: Din Music --- internal/provider-config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/provider-config/config.go b/internal/provider-config/config.go index 89961ad9..b0a3a7c9 100644 --- a/internal/provider-config/config.go +++ b/internal/provider-config/config.go @@ -569,10 +569,10 @@ func DetermineLXDAddress(protocol string, address string) (string, error) { port = "443" } - address = fmt.Sprintf("%s:%s", address, port) + url.Host = fmt.Sprintf("%s:%s", url.Hostname(), port) } - return address, nil + return url.String(), nil default: return "", fmt.Errorf("Invalid scheme %q: Value must be one of: [unix, https]", scheme) }