Skip to content

Commit

Permalink
NS1: add warning for deprecated record
Browse files Browse the repository at this point in the history
  • Loading branch information
costasd committed Aug 12, 2024
1 parent 1738c6e commit af34202
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/ns1/ns1Provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/StackExchange/dnscontrol/v4/models"
"github.com/StackExchange/dnscontrol/v4/pkg/diff2"
"github.com/StackExchange/dnscontrol/v4/pkg/printer"
"github.com/StackExchange/dnscontrol/v4/providers"
"gopkg.in/ns1/ns1-go.v2/rest"
"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
Expand Down Expand Up @@ -338,6 +339,7 @@ func buildRecord(recs models.Records, domain string, id string) *dns.Record {
strconv.Itoa(int(r.DsDigestType)),
r.DsDigest}})
} else if r.Type == "NS1_URLFWD" {
printer.Warnf("NS1_URLFWD is deprecated and may stop working anytime now. Please avoid such records going forward.\n")
rec.Type = "URLFWD"
rec.AddAnswer(&dns.Answer{Rdata: strings.Fields(r.GetTargetField())})
} else if r.Type == "SVCB" || r.Type == "HTTPS" {
Expand Down

0 comments on commit af34202

Please sign in to comment.