mirror of
https://github.com/coredns/coredns.git
synced 2026-10-08 19:45:21 -04:00
plugin: use Zones.Contains when any match suffices (#8505)
This commit is contained in:
@@ -40,8 +40,7 @@ func (l *Loop) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
|
||||
|
||||
state := request.Request{W: w, Req: r}
|
||||
|
||||
zone := plugin.Zones([]string{l.zone}).Matches(state.Name())
|
||||
if zone == "" {
|
||||
if !plugin.Zones([]string{l.zone}).Contains(state.Name()) {
|
||||
return plugin.NextOrFailure(l.Name(), l.Next, ctx, w, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user