Updated Writing Middleware (markdown)

Matt Holt 2015-11-07 22:22:57 -07:00
parent f92f47c33d
commit 5c4fccf0e8

@ -85,4 +85,4 @@ rewrite /bar /baz
creates just 1 struct but that struct holds 2 rules, for example, in a field like this: `Rules []Rule`.
Once that's all set up, you'll need to register your middleware so Caddy knows about it. You can look in the [config/directives.go](https://github.com/mholt/caddy/blob/master/config/directives.go) file to see the list of standard directives and think about where in the chain your middleware goes. The ordering is very important, so be sure to get it right! Follow the remaining steps in [Extending Caddy](https://github.com/mholt/caddy/wiki/Extending-Caddy) to learn how to test your middleware and make it available to others.
Once that's all set up, you'll need to register your middleware so Caddy knows about it. You can look in the [caddy/directives.go](https://github.com/mholt/caddy/blob/master/caddy/directives.go) file to see the list of standard directives and think about where in the chain your middleware goes. The ordering is very important, so be sure to get it right! Follow the remaining steps in [Extending Caddy](https://github.com/mholt/caddy/wiki/Extending-Caddy) to learn how to test your middleware and make it available to others.