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-16 18:38:03 +03:00
{{if $ backend . LoadBalancer . Sticky }}
sticky = true
{{end}}
2017-10-10 12:10:02 +03:00
{{if $ backend . LoadBalancer . Stickiness }}
2017-10-16 18:38:03 +03:00
[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-12-20 12:26:03 +03:00
entryPoints = [{{range $ frontend . EntryPoints }}
"{{.}}",
{{end}}]
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}}]
2017-12-15 13:48:03 +03:00
{{if $ frontend . Redirect }}
[frontends."{{ $ frontendName }}".redirect]
entryPoint = "{{ $ frontend . RedirectEntryPoint }}"
regex = "{{ $ frontend . RedirectRegex }}"
replacement = "{{ $ frontend . RedirectReplacement }}"
{{end}}
2018-01-02 16:49:11 +03:00
{{if $ frontend . Headers }}
2017-11-28 15:36:03 +03:00
[frontends."{{ $ frontendName }}".headers]
SSLRedirect = {{ $ frontend . Headers . SSLRedirect }}
SSLTemporaryRedirect = {{ $ frontend . Headers . SSLTemporaryRedirect }}
SSLHost = "{{ $ frontend . Headers . SSLHost }}"
STSSeconds = {{ $ frontend . Headers . STSSeconds }}
STSIncludeSubdomains = {{ $ frontend . Headers . STSIncludeSubdomains }}
STSPreload = {{ $ frontend . Headers . STSPreload }}
ForceSTSHeader = {{ $ frontend . Headers . ForceSTSHeader }}
FrameDeny = {{ $ frontend . Headers . FrameDeny }}
CustomFrameOptionsValue = "{{ $ frontend . Headers . CustomFrameOptionsValue }}"
ContentTypeNosniff = {{ $ frontend . Headers . ContentTypeNosniff }}
BrowserXSSFilter = {{ $ frontend . Headers . BrowserXSSFilter }}
ContentSecurityPolicy = "{{ $ frontend . Headers . ContentSecurityPolicy }}"
PublicKey = "{{ $ frontend . Headers . PublicKey }}"
ReferrerPolicy = "{{ $ frontend . Headers . ReferrerPolicy }}"
IsDevelopment = {{ $ frontend . Headers . IsDevelopment }}
2018-01-02 11:42:03 +03:00
{{if $ frontend . Headers . AllowedHosts }}
AllowedHosts = [{{range $ frontend . Headers . AllowedHosts }}
"{{.}}",
{{end}}]
{{end}}
{{if $ frontend . Headers . HostsProxyHeaders }}
HostsProxyHeaders = [{{range $ frontend . Headers . HostsProxyHeaders }}
"{{.}}",
{{end}}]
{{end}}
2017-11-28 15:36:03 +03:00
{{if $ frontend . Headers . CustomRequestHeaders }}
[frontends."{{ $ frontendName }}".headers.customrequestheaders]
{{range $k, $v := $ frontend . Headers . CustomRequestHeaders }}
{{ $k}} = "{{ $v}}"
{{end}}
{{end}}
{{if $ frontend . Headers . CustomResponseHeaders }}
[frontends."{{ $ frontendName }}".headers.customresponseheaders]
{{range $k, $v := $ frontend . Headers . CustomResponseHeaders }}
{{ $k}} = "{{ $v}}"
{{end}}
{{end}}
{{if $ frontend . Headers . SSLProxyHeaders }}
[frontends."{{ $ frontendName }}".headers.SSLProxyHeaders]
{{range $k, $v := $ frontend . Headers . SSLProxyHeaders }}
{{ $k}} = "{{ $v}}"
{{end}}
{{end}}
{{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}}
2018-01-02 16:49:11 +03:00
{{end}}