diff --git a/provider/ecs/config.go b/provider/ecs/config.go index 88a24aad8..ab77f5e77 100644 --- a/provider/ecs/config.go +++ b/provider/ecs/config.go @@ -54,6 +54,7 @@ func (p *Provider) buildConfiguration(services map[string][]ecsInstance) (*types "getRateLimitsExtractorFunc": getFuncStringValue(label.TraefikFrontendRateLimitExtractorFunc, ""), "getRateLimits": getRateLimits, // Headers + "hasHeaders": hasPrefixFuncLabel(label.TraefikFrontendHeaders), "hasRequestHeaders": hasFuncLabel(label.TraefikFrontendRequestHeaders), "getRequestHeaders": getFuncMapValue(label.TraefikFrontendRequestHeaders), "hasResponseHeaders": hasFuncLabel(label.TraefikFrontendResponseHeaders), diff --git a/templates/ecs.tmpl b/templates/ecs.tmpl index ca735535d..b96c1047d 100644 --- a/templates/ecs.tmpl +++ b/templates/ecs.tmpl @@ -92,6 +92,7 @@ {{end}} {{end}} + {{if hasHeaders $instance }} [frontends."frontend-{{ $serviceName }}".headers] {{if hasSSLRedirectHeaders $instance}} SSLRedirect = {{getSSLRedirectHeaders $instance}} @@ -168,6 +169,7 @@ {{$k}} = "{{$v}}" {{end}} {{end}} + {{end}} [frontends.frontend-{{ $serviceName }}.routes.route-frontend-{{ $serviceName }}] rule = "{{getFrontendRule $instance}}"