From 8cc9f4cfafa2185615f31287768dd31c32399495 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 28 Feb 2024 09:13:33 +0100 Subject: [PATCH] wip --- pkg/apiclient/client_http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apiclient/client_http.go b/pkg/apiclient/client_http.go index 37285a64476..33b50b7e4b0 100644 --- a/pkg/apiclient/client_http.go +++ b/pkg/apiclient/client_http.go @@ -16,7 +16,7 @@ import ( ) func (c *ApiClient) NewRequest(method, url string, body interface{}) (*http.Request, error) { - if !strings.HasSuffix(c.BaseURL.Path, "/") && strings.HasPrefix(c.BaseURL.Path, "http") { + if !strings.HasSuffix(c.BaseURL.Path, "/") && (strings.HasPrefix(c.BaseURL.Path, "http") || strings.HasPrefix(c.BaseURL.Path, ":")) { return nil, fmt.Errorf("BaseURL must have a trailing slash, but %q does not", c.BaseURL) }