Elaborate on possible use of status codes with the errors middleware

This commit is contained in:
Moritz E. Beber 2021-06-08 19:02:05 +02:00 committed by GitHub
parent 2560626419
commit 521fed1fea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View file

@ -14,10 +14,10 @@ This [documentation](https://doc.traefik.io/traefik/) is built with [mkdocs](htt
### Method 1: `Docker` and `make` ### Method 1: `Docker` and `make`
You can build the documentation and test it locally (with live reloading), using the `docs` target: You can build the documentation and test it locally (with live reloading), using the `docs-serve` target:
```bash ```bash
$ make docs $ make docs-serve
docker build -t traefik-docs -f docs.Dockerfile . docker build -t traefik-docs -f docs.Dockerfile .
# […] # […]
docker run --rm -v /home/user/go/github/traefik/traefik:/mkdocs -p 8000:8000 traefik-docs mkdocs serve docker run --rm -v /home/user/go/github/traefik/traefik:/mkdocs -p 8000:8000 traefik-docs mkdocs serve
@ -85,10 +85,12 @@ Running ["HtmlCheck", "ImageCheck", "ScriptCheck", "LinkCheck"] on /app/site/bas
If you've made changes to the documentation, it's safter to clean it before verifying it. If you've made changes to the documentation, it's safter to clean it before verifying it.
```bash ```bash
$ make docs-clean docs-verify $ make docs
... ...
``` ```
Will perform all necessary steps for you.
!!! note "Disabling Documentation Verification" !!! note "Disabling Documentation Verification"
Verification can be disabled by setting the environment variable `DOCS_VERIFY_SKIP` to `true`: Verification can be disabled by setting the environment variable `DOCS_VERIFY_SKIP` to `true`:

View file

@ -99,7 +99,10 @@ The status code ranges are inclusive (`500-599` will trigger with every code bet
!!! note "" !!! note ""
You can define either a status code as a number (`500`) or ranges by separating two codes with a dash (`500-599`). You can define either a status code as a number (`500`),
as multiple comma-separated numbers (`500,502`),
as ranges by separating two codes with a dash (`500-599`),
or a combination of the two (`404,418,500-599`).
### `service` ### `service`