From 1f8aee2ff91a634a3891b68e40f849cb34d29021 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Mon, 20 Jun 2016 12:00:42 -0600 Subject: [PATCH] Pass in whole controller now, not just the key --- Writing-a-Plugin:-HTTP-Middleware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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} }