dnsservice/dcaddy/plugin/caddydns/caddyfile.go

15 lines
373 B
Go
Raw Permalink Normal View History

2024-08-03 19:05:31 +00:00
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
})
}