Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NS1: add warning for deprecated record #3078

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading