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