This commit is contained in:
Nixon 2024-08-13 14:58:31 -07:00
parent a4ff4b238f
commit e4bfa03f3e
No known key found for this signature in database

View file

@ -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)