mirror of
https://github.com/caddyserver/website.git
synced 2025-05-07 04:07:13 -04:00
Add simpler example using respond
This commit is contained in:
parent
51e36ec43f
commit
678f3524ae
1 changed files with 8 additions and 0 deletions
|
@ -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}"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue