diff --git a/keydb_extension.go b/keydb_extension.go index 05ad779..23b7801 100644 --- a/keydb_extension.go +++ b/keydb_extension.go @@ -9,6 +9,7 @@ import ( "github.com/caddyserver/caddy/v2" "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile" + "github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile" "github.com/caddyserver/caddy/v2/modules/caddyhttp" "github.com/go-redis/redis/v8" ) @@ -94,6 +95,12 @@ func (h *KeyDBHandler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { return nil } +func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) { + var m KeyDBHandler + err := m.UnmarshalCaddyfile(h.Dispenser) + return m, err +} + var ( _ caddy.Provisioner = (*KeyDBHandler)(nil) _ caddyhttp.MiddlewareHandler = (*KeyDBHandler)(nil)