aboutsummaryrefslogtreecommitdiff
path: root/plugin/local/setup.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/local/setup.go')
-rw-r--r--plugin/local/setup.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugin/local/setup.go b/plugin/local/setup.go
new file mode 100644
index 000000000..9bd0dd605
--- /dev/null
+++ b/plugin/local/setup.go
@@ -0,0 +1,20 @@
+package local
+
+import (
+ "github.com/coredns/caddy"
+ "github.com/coredns/coredns/core/dnsserver"
+ "github.com/coredns/coredns/plugin"
+)
+
+func init() { plugin.Register("local", setup) }
+
+func setup(c *caddy.Controller) error {
+ l := Local{}
+
+ dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {
+ l.Next = next
+ return l
+ })
+
+ return nil
+}