diff --git a/Writing-a-Plugin:-HTTP-Middleware.md b/Writing-a-Plugin:-HTTP-Middleware.md index 82f3338..aecc19c 100644 --- a/Writing-a-Plugin:-HTTP-Middleware.md +++ b/Writing-a-Plugin:-HTTP-Middleware.md @@ -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} }