36 lines
735 B
TOML
36 lines
735 B
TOML
defaultEntryPoints = ["http"]
|
|
|
|
logLevel = "DEBUG"
|
|
|
|
[entryPoints]
|
|
[entryPoints.http]
|
|
address = ":80"
|
|
|
|
[file]
|
|
|
|
|
|
[Routers]
|
|
[Routers.router1]
|
|
Service = "service1"
|
|
Middlewares = [ "ratelimit" ]
|
|
Rule = "Path:/"
|
|
|
|
[Middlewares]
|
|
[Middlewares.ratelimit.RateLimit]
|
|
extractorfunc = "client.ip"
|
|
[Middlewares.ratelimit.RateLimit.rateset.rateset1]
|
|
period = "60s"
|
|
average = 4
|
|
burst = 5
|
|
[Middlewares.ratelimit.RateLimit.rateset.rateset2]
|
|
period = "3s"
|
|
average = 1
|
|
burst = 2
|
|
|
|
[Services]
|
|
[Services.service1]
|
|
[Services.service1.LoadBalancer]
|
|
passHostHeader = true
|
|
[[Services.service1.LoadBalancer.Servers]]
|
|
URL = "http://{{.Server1}}:80"
|
|
Weight = 1
|