1
0
Fork 0

Enhance middleware examples.

This commit is contained in:
Ludovic Fernandez 2019-03-29 12:34:05 +01:00 committed by Traefiker Bot
parent fa2c57f7cb
commit a45f285a5c
15 changed files with 286 additions and 345 deletions

View file

@ -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