mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-13 02:50:27 +08:00
Merge branch 'master' of github.com:StackExchange/dnscontrol
This commit is contained in:
commit
db6e094aba
1 changed files with 2 additions and 8 deletions
|
@ -2,14 +2,12 @@ package namedotcom
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"strconv"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/miekg/dns/dnsutil"
|
"github.com/miekg/dns/dnsutil"
|
||||||
|
|
||||||
"github.com/StackExchange/dnscontrol/models"
|
"github.com/StackExchange/dnscontrol/models"
|
||||||
"github.com/StackExchange/dnscontrol/providers/diff"
|
"github.com/StackExchange/dnscontrol/providers/diff"
|
||||||
"strconv"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultNameservers = []*models.Nameserver{
|
var defaultNameservers = []*models.Nameserver{
|
||||||
|
@ -83,11 +81,7 @@ func checkNSModifications(dc *models.DomainConfig) {
|
||||||
newList := make([]*models.RecordConfig, 0, len(dc.Records))
|
newList := make([]*models.RecordConfig, 0, len(dc.Records))
|
||||||
for _, rec := range dc.Records {
|
for _, rec := range dc.Records {
|
||||||
if rec.Type == "NS" && rec.NameFQDN == dc.Name {
|
if rec.Type == "NS" && rec.NameFQDN == dc.Name {
|
||||||
// name.com does change base domain NS records. dnscontrol will print warnings if you try to set them to anything besides the name.com defaults.
|
continue // Apex NS records are automatically created for the domain's nameservers and cannot be managed otherwise via the name.com API.
|
||||||
if !strings.HasSuffix(rec.Target, ".name.com.") {
|
|
||||||
log.Printf("Warning: name.com does not allow NS records on base domain to be modified. %s will not be added.", rec.Target)
|
|
||||||
}
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
newList = append(newList, rec)
|
newList = append(newList, rec)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue