traefik/integration/fixtures/ratelimit/simple.toml
mpl 092aa8fa6d API: remove configuration of Entrypoint and Middlewares
Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
2019-07-19 12:28:07 +02:00

42 lines
903 B
TOML

[global]
checkNewVersion = false
sendAnonymousUsage = false
[api]
[log]
level = "DEBUG"
[entryPoints]
[entryPoints.web]
address = ":8081"
[providers.file]
filename = "{{ .SelfFilename }}"
## dynamic configuration ##
[http.routers]
[http.routers.router1]
service = "service1"
middlewares = [ "ratelimit" ]
rule = "Path(`/`)"
[http.middlewares]
[http.middlewares.ratelimit.rateLimit]
extractorfunc = "client.ip"
[http.middlewares.ratelimit.rateLimit.rateSet.rateset1]
period = "60s"
average = 4
burst = 5
[http.middlewares.ratelimit.rateLimit.rateSet.rateset2]
period = "3s"
average = 1
burst = 2
[http.services]
[http.services.service1]
[http.services.service1.loadBalancer]
passHostHeader = true
[[http.services.service1.loadBalancer.servers]]
url = "http://{{.Server1}}:80"