1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

PACKETFRAME: always include default nameservers (#1368)

This commit is contained in:
Hampton
2022-01-07 09:24:24 -05:00
committed by GitHub
parent ea20c13e67
commit 6e29b556a0
2 changed files with 25 additions and 7 deletions

View File

@@ -14,6 +14,11 @@ const (
defaultBaseURL = "https://packetframe.com/api/"
)
var defaultNameServerNames = []string{
"ns1.packetframe.com",
"ns2.packetframe.com",
}
type zone struct {
ID string `json:"id"`
Zone string `json:"zone"`
@@ -75,6 +80,16 @@ func (c *packetframeProvider) getRecords(zoneID string) ([]domainRecord, error)
}
records = append(records, dr.Data.Records...)
for i := range defaultNameServerNames {
records = append(records, domainRecord{
Type: "NS",
TTL: 86400,
Value: defaultNameServerNames[i] + ".",
Zone: zoneID,
ID: "0",
})
}
return records, nil
}