Enhance middleware examples.
This commit is contained in:
parent
fa2c57f7cb
commit
a45f285a5c
15 changed files with 286 additions and 345 deletions
|
@ -9,23 +9,17 @@ The DigestAuth middleware is a quick way to restrict access to your services to
|
|||
|
||||
## Configuration Examples
|
||||
|
||||
??? example "File -- Declaring the user list"
|
||||
```yaml tab="Docker"
|
||||
labels:
|
||||
- "traefik.http.middlewares.declared-users-only.digestauth.usersFile=path-to-file.ext",
|
||||
```
|
||||
|
||||
```toml
|
||||
[http.middlewares]
|
||||
[http.middlewares.test-auth.digestauth]
|
||||
users = ["test:traefik:a2688e031edb4be6a3797f3882655c05",
|
||||
"test2:traefik:518845800f9e2bfb1f1f740ec24f074e"]
|
||||
```
|
||||
|
||||
??? example "Docker -- Using an external file for the authorized users"
|
||||
|
||||
```yml
|
||||
a-container:
|
||||
image: a-container-image
|
||||
labels:
|
||||
- "traefik.http.middlewares.declared-users-only.digestauth.usersFile=path-to-file.ext",
|
||||
```
|
||||
```toml tab="File"
|
||||
[http.middlewares]
|
||||
[http.middlewares.test-auth.digestauth]
|
||||
users = ["test:traefik:a2688e031edb4be6a3797f3882655c05",
|
||||
"test2:traefik:518845800f9e2bfb1f1f740ec24f074e"]
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue