ovh: follow cname (#1467)

This commit is contained in:
Adrien DAURIAT 2021-08-25 13:25:05 +02:00 committed by GitHub
parent 99ba43f743
commit e0b0f22e85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,9 +126,9 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
fqdn, value := dns01.GetRecord(domain, keyAuth)
// Parse domain name
authZone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(domain))
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return fmt.Errorf("ovh: could not determine zone for domain %q: %w", domain, err)
return fmt.Errorf("ovh: could not determine zone for domain %q: %w", fqdn, err)
}
authZone = dns01.UnFqdn(authZone)
@ -170,9 +170,9 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return fmt.Errorf("ovh: unknown record ID for '%s'", fqdn)
}
authZone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(domain))
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return fmt.Errorf("ovh: could not determine zone for domain %q: %w", domain, err)
return fmt.Errorf("ovh: could not determine zone for domain %q: %w", fqdn, err)
}
authZone = dns01.UnFqdn(authZone)
@ -210,5 +210,5 @@ func extractRecordName(fqdn, zone string) string {
if idx := strings.Index(name, "."+zone); idx != -1 {
return name[:idx]
}
return name
return ""
}