refactor(ecs): headers as pointer.

This commit is contained in:
Fernandez Ludovic 2018-01-02 15:57:04 +01:00 committed by Traefiker
parent a33476dea8
commit de7dd068d9
2 changed files with 3 additions and 0 deletions

View file

@ -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),

View file

@ -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}}"