35 lines
786 B
TOML
35 lines
786 B
TOML
[log]
|
|
logLevel = "DEBUG"
|
|
|
|
[entrypoints]
|
|
[entrypoints.web]
|
|
address = ":80"
|
|
|
|
[providers]
|
|
[providers.file]
|
|
|
|
[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"
|
|
Weight = 1
|