dnsservice/dcaddy/plugin/caddydns/caddyfile.go
2024-08-03 14:05:31 -05:00

15 lines
373 B
Go

package caddydns
import (
"github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile"
"github.com/caddyserver/caddy/v2/modules/caddyhttp"
)
func init() {
httpcaddyfile.RegisterHandlerDirective("dns_over_https", func(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
mod := &Handler{}
err := mod.UnmarshalCaddyfile(h.Dispenser)
return mod, err
})
}