2018-01-10 16:48:04 +00:00
|
|
|
defaultEntryPoints = ["http"]
|
|
|
|
|
|
|
|
logLevel = "DEBUG"
|
|
|
|
debug = true
|
|
|
|
|
2018-01-24 10:57:06 +00:00
|
|
|
[api]
|
2018-01-10 16:48:04 +00:00
|
|
|
|
|
|
|
[entryPoints]
|
2018-04-11 14:30:04 +00:00
|
|
|
[entryPoints.http]
|
2018-01-10 16:48:04 +00:00
|
|
|
address = ":8000"
|
|
|
|
|
|
|
|
[tracing]
|
2018-04-11 14:30:04 +00:00
|
|
|
backend = "{{.TracingBackend}}"
|
|
|
|
servicename = "tracing"
|
2018-01-10 16:48:04 +00:00
|
|
|
[tracing.zipkin]
|
2018-04-11 14:30:04 +00:00
|
|
|
httpEndpoint = "http://{{.ZipkinIP}}:9411/api/v1/spans"
|
|
|
|
debug = true
|
2018-01-10 16:48:04 +00:00
|
|
|
[tracing.jaeger]
|
2018-04-11 14:30:04 +00:00
|
|
|
samplingType = "const"
|
|
|
|
samplingParam = 1.0
|
|
|
|
|
2018-01-10 16:48:04 +00:00
|
|
|
[retry]
|
2018-04-11 14:30:04 +00:00
|
|
|
attempts = 3
|
|
|
|
|
2018-01-10 16:48:04 +00:00
|
|
|
[file]
|
|
|
|
|
|
|
|
[backends]
|
|
|
|
[backends.backend1]
|
|
|
|
[backends.backend1.servers.server-ratelimit]
|
|
|
|
url = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
2018-04-11 14:30:04 +00:00
|
|
|
weight = 1
|
2018-01-10 16:48:04 +00:00
|
|
|
[backends.backend2]
|
|
|
|
[backends.backend2.servers.server-retry]
|
|
|
|
url = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
2018-04-11 14:30:04 +00:00
|
|
|
weight = 1
|
2018-01-10 16:48:04 +00:00
|
|
|
[backends.backend3]
|
|
|
|
[backends.backend3.servers.server-auth]
|
|
|
|
url = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
2018-04-11 14:30:04 +00:00
|
|
|
weight = 1
|
|
|
|
|
2018-01-10 16:48:04 +00:00
|
|
|
[frontends]
|
|
|
|
[frontends.frontend1]
|
|
|
|
passHostHeader = true
|
|
|
|
backend = "backend1"
|
|
|
|
[frontends.frontend1.routes.test_ratelimit]
|
|
|
|
rule = "Path:/ratelimit"
|
|
|
|
[frontends.frontend1.ratelimit]
|
|
|
|
extractorfunc = "client.ip"
|
|
|
|
[frontends.frontend1.ratelimit.rateset.rateset1]
|
|
|
|
period = "60s"
|
|
|
|
average = 4
|
|
|
|
burst = 5
|
|
|
|
[frontends.frontend1.ratelimit.rateset.rateset2]
|
|
|
|
period = "3s"
|
|
|
|
average = 1
|
|
|
|
burst = 2
|
|
|
|
[frontends.frontend2]
|
|
|
|
passHostHeader = true
|
|
|
|
backend = "backend2"
|
|
|
|
[frontends.frontend2.routes.test_retry]
|
|
|
|
rule = "Path:/retry"
|
|
|
|
[frontends.frontend3]
|
|
|
|
passHostHeader = true
|
|
|
|
backend = "backend3"
|
|
|
|
basicAuth = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
|
|
|
[frontends.frontend3.routes.test_auth]
|
|
|
|
rule = "Path:/auth"
|