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:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user