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) }