Skip to content

Commit

Permalink
Add temporary compatibility with ns.<zone>
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Oct 31, 2023
1 parent 0657a08 commit dc7b5dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ func (h *DNSHandler) ResolveRRs(question dns.Question) ([]dns.RR, int) {
})
}
}
} else if subdomain == "ns" { // ns.<zone> - backwards compatibility
switch question.Qtype {
case dns.TypeA:
records = append(records, &dns.A{
A: h.nsA[0],
})
}
} else if subdomain == "alpha" { // alpha.<zone> - first nameserver
switch question.Qtype {
case dns.TypeA:
Expand Down

0 comments on commit dc7b5dc

Please sign in to comment.