15 lines
373 B
Go
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
|
||
|
})
|
||
|
}
|