From 6ff47b2a29b95dec97a079195ab8687d7aedddf9 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sun, 3 Apr 2022 01:44:37 +0200 Subject: [PATCH] fixed rules parsing & debug --- setup.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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} })