Trim it like there's no tomorrow

This commit is contained in:
斟酌 鵬兄 2022-03-14 07:33:01 +09:00
parent 67a819a28a
commit 24d52851ca

View File

@ -116,7 +116,9 @@ func (c *customDNSProviderSolver) Present(ch *v1alpha1.ChallengeRequest) error {
return err
}
_zone := strings.TrimSuffix(ch.ResolvedFQDN, "."+domainName)
_zone := strings.TrimRight(ch.ResolvedFQDN, ".")
_zone = strings.TrimSuffix(_zone, domainName)
_zone = strings.TrimRight(_zone, ".")
_key := "\"" + ch.Key + "\""
err = dnsObj.AddRecord("TXT", _zone, _key, false, "")