From e0b0f22e855cf2aa53e6b6f60fd0c188ecddbb7d Mon Sep 17 00:00:00 2001 From: Adrien DAURIAT <16813527+dauriata@users.noreply.github.com> Date: Wed, 25 Aug 2021 13:25:05 +0200 Subject: [PATCH] ovh: follow cname (#1467) --- providers/dns/ovh/ovh.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/providers/dns/ovh/ovh.go b/providers/dns/ovh/ovh.go index f1aaf869..5ce5f172 100644 --- a/providers/dns/ovh/ovh.go +++ b/providers/dns/ovh/ovh.go @@ -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 "" }