feat(marathon): add whitelistSourceRange label.

This commit is contained in:
Fernandez Ludovic 2017-12-16 15:01:45 +01:00 committed by Traefiker
parent 38a3fe4316
commit edc55aad3c
2 changed files with 7 additions and 0 deletions

View file

@ -49,6 +49,7 @@ func (p *Provider) buildConfiguration() *types.Configuration {
"getBasicAuth": getFuncSliceStringService(label.TraefikFrontendAuthBasic),
"getServiceNames": getServiceNames,
"getServiceNameSuffix": getServiceNameSuffix,
"getWhitelistSourceRange": getFuncSliceStringService(label.TraefikFrontendWhitelistSourceRange),
}
v := url.Values{}

View file

@ -62,6 +62,12 @@
"{{.}}",
{{end}}]
{{if getWhitelistSourceRange $app $serviceName}}
whitelistSourceRange = [{{range getWhitelistSourceRange $app $serviceName}}
"{{.}}",
{{end}}]
{{end}}
basicAuth = [{{range getBasicAuth $app $serviceName}}
"{{.}}",
{{end}}]