Pass in whole controller now, not just the key

Matt Holt 2016-06-20 12:00:42 -06:00
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: 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 ```go
cfg := httpserver.GetConfig(c.Key) cfg := httpserver.GetConfig(c)
mid := func(next httpserver.Handler) httpserver.Handler { mid := func(next httpserver.Handler) httpserver.Handler {
return MyHandler{Next: next} return MyHandler{Next: next}
} }