mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-24 15:43:08 +08:00
NETLIFY: bugfix: append . to records which point to hosts (#1828)
Signed-off-by: Amogh Lele <amolele@gmail.com>
This commit is contained in:
parent
627108ee03
commit
5b95c099f6
1 changed files with 8 additions and 2 deletions
|
@ -3,12 +3,14 @@ package netlify
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v3/models"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/diff"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/printer"
|
||||
"github.com/StackExchange/dnscontrol/v3/pkg/txtutil"
|
||||
"github.com/StackExchange/dnscontrol/v3/providers"
|
||||
"strings"
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
var nameServerSuffixes = []string{
|
||||
|
@ -108,8 +110,12 @@ func (n *netlifyProvider) GetZoneRecords(domain string) (models.Records, error)
|
|||
|
||||
rec.SetLabelFromFQDN(r.Hostname, domain) // netlify returns the FQDN
|
||||
|
||||
if r.Type == "CNAME" || r.Type == "MX" || r.Type == "NS" {
|
||||
r.Value = dns.CanonicalName(r.Value)
|
||||
}
|
||||
|
||||
switch rtype := r.Type; rtype {
|
||||
case "NETLIFY", "NETLIFYv6": // these behave similar to a CNAME
|
||||
case "NETLIFY", "NETLIFYv6": // transparently ignore
|
||||
continue
|
||||
case "MX":
|
||||
err = rec.SetTargetMX(uint16(r.Priority), r.Value)
|
||||
|
|
Loading…
Reference in a new issue