2016-02-08 23:57:32 +03:00
[backends]{{range $ backendName , $ backend := .Backends}}
2017-05-16 00:16:35 +03:00
[backends."{{ $ backendName }}"]
2017-02-03 19:47:48 +03:00
{{if $ backend . CircuitBreaker }}
[backends."{{ $ backendName }}".circuitbreaker]
expression = "{{ $ backend . CircuitBreaker . Expression }}"
{{end}}
2017-01-25 16:11:00 +03:00
[backends."{{ $ backendName }}".loadbalancer]
method = "{{ $ backend . LoadBalancer . Method }}"
2017-10-10 12:10:02 +03:00
{{if $ backend . LoadBalancer . Stickiness }}
[Backends."{{ $ backendName }}".LoadBalancer.Stickiness]
2017-10-12 18:50:03 +03:00
cookieName = "{{ $ backend . LoadBalancer . Stickiness . CookieName }}"
2017-01-25 16:11:00 +03:00
{{end}}
2016-02-08 23:57:32 +03:00
{{range $ serverName , $ server := $ backend . Servers }}
[backends."{{ $ backendName }}".servers."{{ $ serverName }}"]
url = "{{ $ server . URL }}"
weight = {{ $ server . Weight }}
{{end}}
{{end}}
[frontends]{{range $ frontendName , $ frontend := .Frontends}}
[frontends."{{ $ frontendName }}"]
backend = "{{ $ frontend . Backend }}"
2016-08-03 02:48:53 +03:00
priority = {{ $ frontend . Priority }}
2016-05-10 14:43:24 +03:00
passHostHeader = {{ $ frontend . PassHostHeader }}
2017-04-23 17:17:20 +03:00
basicAuth = [{{range $ frontend . BasicAuth }}
"{{.}}",
2017-04-30 12:22:07 +03:00
{{end}}]
whitelistSourceRange = [{{range $ frontend . WhitelistSourceRange }}
"{{.}}",
2017-04-23 17:17:20 +03:00
{{end}}]
2016-02-08 23:57:32 +03:00
{{range $ routeName , $ route := $ frontend . Routes }}
[frontends."{{ $ frontendName }}".routes."{{ $ routeName }}"]
2016-04-20 14:26:51 +03:00
rule = "{{ $ route . Rule }}"
2016-02-08 23:57:32 +03:00
{{end}}
{{end}}