diff --git a/setup.go b/setup.go index 3ef0d3d..b1d62ec 100644 --- a/setup.go +++ b/setup.go @@ -16,14 +16,14 @@ func init() { } func setup(c *caddy.Controller) error { - c.Next() - rules, err := parseRules(c) if err != nil { return plugin.Error("override", err) } + log.Debug(rules) + dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { return Override{Next: next, Rules: rules} })