From f46083f266c5fdceb07f9f79300c6332a1fc4ee0 Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 27 Feb 2024 15:18:01 +0100 Subject: [PATCH] is this it? :-/ --- 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 0240618f5356..3c284df3c0a0 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, "/") { + if strings.HasPrefix(c.BaseURL.Path, "http") && !strings.HasSuffix(c.BaseURL.Path, "/") { return nil, fmt.Errorf("BaseURL must have a trailing slash, but %q does not", c.BaseURL) }