diff --git a/provider/ecs/config.go b/provider/ecs/config.go index cb623294b..7e53bdd82 100644 --- a/provider/ecs/config.go +++ b/provider/ecs/config.go @@ -40,6 +40,7 @@ func (p *Provider) buildConfiguration(services map[string][]ecsInstance) (*types "hasMaxConnLabels": hasMaxConnLabels, "getMaxConnAmount": getFuncFirstInt64Value(label.TraefikBackendMaxConnAmount, math.MaxInt64), "getMaxConnExtractorFunc": getFuncFirstStringValue(label.TraefikBackendMaxConnExtractorFunc, label.DefaultBackendMaxconnExtractorFunc), + "getWhitelistSourceRange": getFuncSliceString(label.TraefikFrontendWhitelistSourceRange), } return p.GetConfiguration("templates/ecs.tmpl", ecsFuncMap, struct { Services map[string][]ecsInstance diff --git a/templates/ecs.tmpl b/templates/ecs.tmpl index 54fee2b6c..44042ccc0 100644 --- a/templates/ecs.tmpl +++ b/templates/ecs.tmpl @@ -51,6 +51,12 @@ "{{.}}", {{end}}] + {{if getWhitelistSourceRange .}} + whitelistSourceRange = [{{range getWhitelistSourceRange .}} + "{{.}}", + {{end}}] + {{end}} + basicAuth = [{{range getBasicAuth .}} "{{.}}", {{end}}]