mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
21 lines
364 B
Go
21 lines
364 B
Go
|
|
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
|
||
|
|
}
|