mirror of
https://github.com/caddyserver/caddy.git
synced 2025-07-07 10:15:06 -04:00
Finished a sentence
parent
340d659dab
commit
e75a84f34b
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user