Add extended forward zone type for overriding public domain records
An extended zone answers authoritatively only for the records it holds locally; any name with nothing configured falls through to recursive resolution instead of a synthesized NXDOMAIN, so a public domain's records don't need to be duplicated just to override a few of them. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8c76Xr2BycaHHu5N4buqi
This commit is contained in:
@@ -33,7 +33,7 @@ func scanZone(sc interface{ Scan(...any) error }) (models.Zone, error) {
|
||||
|
||||
// ZoneFilter narrows a zone listing.
|
||||
type ZoneFilter struct {
|
||||
Kind string // "", "forward", "reverse4", "reverse6", or "reverse" for both
|
||||
Kind string // "", "forward" (includes extended), "extended", "reverse4", "reverse6", or "reverse" for both reverse kinds
|
||||
Search string
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ func (db *DB) Zones(ctx context.Context, f ZoneFilter) ([]models.Zone, error) {
|
||||
// no filter
|
||||
case "reverse":
|
||||
where = append(where, "z.kind IN ('reverse4','reverse6')")
|
||||
case "forward":
|
||||
where = append(where, "z.kind IN ('forward','extended')")
|
||||
default:
|
||||
where = append(where, "z.kind = ?")
|
||||
args = append(args, f.Kind)
|
||||
|
||||
Reference in New Issue
Block a user