1
0
Fork 0

doc: improve examples.

This commit is contained in:
Ludovic Fernandez 2019-07-22 09:58:04 +02:00 committed by Traefiker Bot
parent 8b4ba3cb67
commit 75c99a0491
69 changed files with 1256 additions and 552 deletions

View file

@ -37,23 +37,32 @@ labels:
- "traefik.http.middlewares.test-maxconn.maxconn.amount=10"
```
```toml tab="File"
```toml tab="File (TOML)"
# Limiting to 10 simultaneous connections
[http.middlewares]
[http.middlewares.test-maxconn.maxConn]
amount = 10
```
```yaml tab="File (YAML)"
# Limiting to 10 simultaneous connections
http:
middlewares:
test-maxconn:
maxConn:
amount: 10
```
## Configuration Options
### `amount`
The `amount` option defines the maximum amount of allowed simultaneous connections.
The middleware will return an `HTTP 429 Too Many Requests` if there are already `amount` requests in progress (based on the same `extractorfunc` strategy).
The middleware will return an `HTTP 429 Too Many Requests` if there are already `amount` requests in progress (based on the same `extractorFunc` strategy).
### extractorfunc
### `extractorFunc`
The `extractorfunc` defines the strategy used to categorize requests.
The `extractorFunc` defines the strategy used to categorize requests.
The possible values are: