diff --git a/Middleware.md b/Middleware.md index 4393758..9a5499b 100644 --- a/Middleware.md +++ b/Middleware.md @@ -51,7 +51,6 @@ func MyMiddleware(p parser) Middleware { When `caddy` is run and the config file is parsed and found to use a middleware, that middleware is unwrapped one piece at a time, to eventually expose the underlying handler, which is ready to use thanks to Go closures. (The handler chain is pre-compiled so it doesn't have to do that for every request.) -That's all there is to it! ## Creating new middleware @@ -62,7 +61,7 @@ So how do you start writing middleware? There are two main things to do: 1. Write the middleware code 2. Register it with a certain directive in `init()` -When the server starts up, the middle +When the server starts up, it unwraps each middleware down to the actual handlers one piece at a time. (Middleware that aren't needed won't be invoked.) ### Parsing