Add simpler example using respond

This commit is contained in:
Andy Pilate 2020-11-23 00:00:45 +01:00
parent 51e36ec43f
commit 678f3524ae

View file

@ -53,3 +53,11 @@ handle_errors {
} }
} }
``` ```
Simply use [`respond`](/docs/caddyfile/directives/respond) to return the error code and name
```caddy
handle_errors {
respond "{http.error.status_code} {http.error.status_text}"
}
```