feat(rancher): add WhitelistSourceRange label.

This commit is contained in:
Fernandez Ludovic 2017-12-16 14:18:37 +01:00 committed by Traefiker
parent c042098889
commit c884c7bb8a
2 changed files with 7 additions and 0 deletions

View file

@ -40,6 +40,7 @@ func (p *Provider) buildConfiguration(services []rancherData) *types.Configurati
"getRedirectEntryPoint": getFuncString(label.TraefikFrontendRedirectEntryPoint, label.DefaultFrontendRedirectEntryPoint),
"getRedirectRegex": getFuncString(label.TraefikFrontendRedirectRegex, ""),
"getRedirectReplacement": getFuncString(label.TraefikFrontendRedirectReplacement, ""),
"getWhitelistSourceRange": getFuncSliceString(label.TraefikFrontendWhitelistSourceRange),
}
// filter services

View file

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