Compare commits

..

4 Commits

View File

@@ -213,11 +213,7 @@ func (c *Client) do(ctx context.Context, method, relativeURL string, reqBody int
return fmt.Errorf("unable to parse URL: %s %s %w", method, relativeURL, err)
}
if !strings.HasPrefix(relativeURL, "/") && !reqURL.IsAbs() {
if strings.Contains(relativeURL, "firewall/zone") {
reqURL.Path = path.Join(c.apiV2Path, reqURL.Path)
} else {
reqURL.Path = path.Join(c.apiPath, reqURL.Path)
}
reqURL.Path = path.Join(c.apiPath, reqURL.Path)
}
url := c.baseURL.ResolveReference(reqURL)