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:
@@ -103,8 +103,7 @@ func exprEnv(ctx context.Context, state *request.Request, data *templateData) ma
|
||||
func (h Handler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
|
||||
state := request.Request{W: w, Req: r}
|
||||
|
||||
zone := plugin.Zones(h.Zones).Matches(state.Name())
|
||||
if zone == "" {
|
||||
if !plugin.Zones(h.Zones).Contains(state.Name()) {
|
||||
return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user