diff --git a/README.md b/README.md index 892bcc7..0ea14f2 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ rate_limit { write_interval purge_age } - log_key + log_key storage jitter sweep_interval @@ -205,7 +205,8 @@ We also enable distributed rate limiting. By deploying this config to two or mor "max_events": 2 } }, - "distributed": {} + "distributed": {}, + "log_key": true }, { "handler": "static_response", @@ -241,6 +242,7 @@ rate_limit { events 2 window 5s } + log_key } respond "I'm behind the rate limiter!" diff --git a/caddyfile.go b/caddyfile.go index b7bd629..86ed9f3 100644 --- a/caddyfile.go +++ b/caddyfile.go @@ -168,6 +168,12 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { } } + case "log_key": + if d.NextArg() { + return d.ArgErr() + } + h.LogKey = true + case "storage": if !d.NextArg() { return d.ArgErr()