42 lines
903 B
TOML
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"
|