2019-04-09 15:24:05 +00:00
|
|
|
[global]
|
2019-07-01 09:30:05 +00:00
|
|
|
checkNewVersion = false
|
|
|
|
sendAnonymousUsage = false
|
2019-04-09 15:24:05 +00:00
|
|
|
|
2018-11-27 16:42:04 +00:00
|
|
|
[log]
|
2019-07-01 09:30:05 +00:00
|
|
|
level = "DEBUG"
|
2018-11-27 16:42:04 +00:00
|
|
|
|
2018-01-24 10:57:06 +00:00
|
|
|
[api]
|
2019-09-06 13:08:04 +00:00
|
|
|
insecure = true
|
2018-01-10 16:48:04 +00:00
|
|
|
|
2019-04-15 09:14:05 +00:00
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.web]
|
2018-01-10 16:48:04 +00:00
|
|
|
address = ":8000"
|
|
|
|
|
|
|
|
[tracing]
|
2018-04-11 14:30:04 +00:00
|
|
|
servicename = "tracing"
|
2019-06-27 22:16:04 +00:00
|
|
|
[tracing.zipkin]
|
2019-09-03 09:52:04 +00:00
|
|
|
httpEndpoint = "http://{{.IP}}:9411/api/v2/spans"
|
2018-04-11 14:30:04 +00:00
|
|
|
|
2019-07-15 08:22:03 +00:00
|
|
|
[providers.file]
|
|
|
|
filename = "{{ .SelfFilename }}"
|
2019-07-01 09:30:05 +00:00
|
|
|
|
|
|
|
## dynamic configuration ##
|
2018-01-10 16:48:04 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers]
|
|
|
|
[http.routers.router1]
|
2019-07-01 09:30:05 +00:00
|
|
|
service = "service1"
|
2019-09-03 12:34:04 +00:00
|
|
|
middlewares = ["retry", "ratelimit-1"]
|
2019-07-01 09:30:05 +00:00
|
|
|
rule = "Path(`/ratelimit`)"
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers.router2]
|
2019-07-01 09:30:05 +00:00
|
|
|
service = "service2"
|
|
|
|
middlewares = ["retry"]
|
|
|
|
rule = "Path(`/retry`)"
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.routers.router3]
|
2019-07-01 09:30:05 +00:00
|
|
|
service = "service3"
|
|
|
|
middlewares = ["retry", "basic-auth"]
|
|
|
|
rule = "Path(`/auth`)"
|
2018-04-11 14:30:04 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.middlewares]
|
|
|
|
[http.middlewares.retry.retry]
|
2019-07-01 09:30:05 +00:00
|
|
|
attempts = 3
|
|
|
|
[http.middlewares.basic-auth.basicAuth]
|
|
|
|
users = ["test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/", "test2:$apr1$d9hr9HBB$4HxwgUir3HP4EsggP/QNo0"]
|
2019-09-03 12:34:04 +00:00
|
|
|
[http.middlewares.ratelimit-1.rateLimit]
|
|
|
|
average = 1
|
|
|
|
burst = 2
|
2018-11-14 09:18:03 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services]
|
|
|
|
[http.services.service1]
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.services.service1.loadBalancer]
|
2018-11-14 09:18:03 +00:00
|
|
|
passHostHeader = true
|
2019-07-01 09:30:05 +00:00
|
|
|
[[http.services.service1.loadBalancer.servers]]
|
|
|
|
url = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
2018-11-14 09:18:03 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services.service2]
|
2018-01-10 16:48:04 +00:00
|
|
|
passHostHeader = true
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.services.service2.loadBalancer]
|
|
|
|
[[http.services.service2.loadBalancer.servers]]
|
|
|
|
url = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|
2018-11-14 09:18:03 +00:00
|
|
|
|
2019-03-14 08:30:04 +00:00
|
|
|
[http.services.service3]
|
2018-01-10 16:48:04 +00:00
|
|
|
passHostHeader = true
|
2019-07-01 09:30:05 +00:00
|
|
|
[http.services.service3.loadBalancer]
|
|
|
|
[[http.services.service3.loadBalancer.servers]]
|
|
|
|
url = "http://{{.WhoAmiIP}}:{{.WhoAmiPort}}"
|