mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 12:28:45 +08:00
403732c433
We realized we made some mistakes with the directive ordering, so we're making some minor adjustments. `abort` and `error` don't really make sense to be after other handler directives, because you would expect to be able to "fail-fast" and throw an error before falling through to some `file_server` or `respond` typically. So we're moving them up to just before `respond`, i.e. before the common handler directives. This is also more consistent with our existing examples in the docs, which actually didn't work due to the directive ordering. See https://caddyserver.com/docs/caddyfile/directives/error#examples Also, `push` doesn't quite make sense to be after `handle`/`route`, since its job is to read from response headers to push additional resources if necessary, and `handle`/`route` may be terminal so push would not be reached if it was declared outside those. And also, it would make sense to be _before_ `templates` because a template _could_ add a `Link` header to the response dynamically. |
||
---|---|---|
.. | ||
addresses_fuzz.go | ||
addresses_test.go | ||
addresses.go | ||
builtins_test.go | ||
builtins.go | ||
directives_test.go | ||
directives.go | ||
httptype_test.go | ||
httptype.go | ||
options_test.go | ||
options.go | ||
pkiapp.go | ||
serveroptions.go | ||
tlsapp_test.go | ||
tlsapp.go |