1
0
Fork 0

Update the middleware documentation

This commit is contained in:
Jean-Baptiste Doumenjou 2019-04-08 17:14:08 +02:00 committed by Traefiker Bot
parent 6ab991ebf4
commit 2e20394af4
24 changed files with 488 additions and 70 deletions

View file

@ -27,6 +27,12 @@ spec:
- 192.168.1.7
```
```yaml tab="Rancher"
# Accepts request from defined IP
labels:
- "traefik.http.middlewares.test-ipwhitelist.IPWhiteList.SourceRange=127.0.0.1/32, 192.168.1.7"
```
```toml tab="File"
# Accepts request from defined IP
[http.middlewares]
@ -82,6 +88,13 @@ The `depth` option tells Traefik to use the `X-Forwarded-For` header and take th
depth: 2
```
```yaml tab="Rancher"
# Whitelisting Based on `X-Forwarded-For` with `depth=2`
labels:
- "traefik.http.middlewares.testIPwhitelist.ipWhiteList.SourceRange=127.0.0.1/32, 192.168.1.7"
- "traefik.http.middlewares.testIPwhitelist.ipwhitelist.ipstrategy.depth=2"
```
```toml tab="File"
# Whitelisting Based on `X-Forwarded-For` with `depth=2`
[http.middlewares]
@ -133,6 +146,12 @@ spec:
- 192.168.1.7
```
```yaml tab="Rancher"
# Exclude from `X-Forwarded-For`
labels:
- "traefik.http.middlewares.test-ipwhitelist.ipwhitelist.ipstrategy.excludedIPs=127.0.0.1/32, 192.168.1.7"
```
```toml tab="File"
# Exclude from `X-Forwarded-For`
[http.middlewares]