caddy/modules
Robin Lambertz e3591009dc
caddyhttp: Add handler for unhandled errors in errorChain (#3063)
* Add handler for unhandled errors in errorChain

Currently, when an error chain is defined, the default error handler is
bypassed entirely - even if the error chain doesn't handle every error.
This results in pages returning a blank 200 OK page.

For instance, it's possible for an error chain to match on the error
status code and only handle a certain subtype of errors (like 403s). In
this case, we'd want any other errors to still go through the default
handler and return an empty page with the status code.

This PR changes the "suffix handler" passed to errorChain.Compile to
set the status code of the response to the error status code.

Fixes #3053

* Move the errorHandlerChain middleware to variable

* Style fix
2020-02-20 15:00:30 -07:00
..
caddyhttp caddyhttp: Add handler for unhandled errors in errorChain (#3063) 2020-02-20 15:00:30 -07:00
caddytls tls: Fix panic loading automation management modules (fix #3004) 2020-02-18 09:54:14 -07:00
filestorage v2: Module documentation; refactor LoadModule(); new caddy struct tags (#2924) 2019-12-10 13:36:46 -07:00
logging logging: Add doc about which fields can't be filtered 2020-01-03 15:28:05 -07:00
standard cmd: Move module imports into standard packages 2019-11-04 12:13:21 -07:00