mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-09 03:04:57 -04:00
Pass in whole controller now, not just the key
parent
8f059eefe8
commit
1f8aee2ff9
@ -62,7 +62,7 @@ func setup(c *caddy.Controller) error {
|
||||
To chain in your new handler, get the config for the current site from the httpserver package. Then wrap your handler in a middleware function:
|
||||
|
||||
```go
|
||||
cfg := httpserver.GetConfig(c.Key)
|
||||
cfg := httpserver.GetConfig(c)
|
||||
mid := func(next httpserver.Handler) httpserver.Handler {
|
||||
return MyHandler{Next: next}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user