Trim it like there's no tomorrow
This commit is contained in:
parent
67a819a28a
commit
24d52851ca
4
main.go
4
main.go
@ -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, "")
|
||||
|
Loading…
Reference in New Issue
Block a user