diff --git a/powerdns/client.go b/powerdns/client.go index 14d8817..fb507ce 100644 --- a/powerdns/client.go +++ b/powerdns/client.go @@ -81,6 +81,7 @@ func sanitizeURL(URL string) (string, error) { cleanURL := "" host := "" schema := "" + path := "" var err error @@ -121,7 +122,11 @@ func sanitizeURL(URL string) (string, error) { host = parsedURL.Host } - cleanURL = schema + "://" + host + if len(parsedURL.Path) > 0 { + path = parsedURL.Path + } + + cleanURL = schema + "://" + host + path return cleanURL, nil }