Add lower-case passHostHeader key support.
This commit is contained in:
parent
f6c6d2bcd0
commit
b1e3444798
3 changed files with 13 additions and 1 deletions
|
@ -575,7 +575,13 @@ var _templatesKvTmpl = []byte(`{{$frontends := List .Prefix "/frontends/" }}
|
|||
{{$entryPoints := GetList . "/entrypoints"}}
|
||||
[frontends."{{$frontend}}"]
|
||||
backend = "{{Get "" . "/backend"}}"
|
||||
{{ $passHostHeader := Get "" . "/passhostheader"}}
|
||||
{{if $passHostHeader}}
|
||||
passHostHeader = {{ $passHostHeader }}
|
||||
{{else}}
|
||||
# keep for compatibility reason
|
||||
passHostHeader = {{Get "true" . "/passHostHeader"}}
|
||||
{{end}}
|
||||
priority = {{Get "0" . "/priority"}}
|
||||
entryPoints = [{{range $entryPoints}}
|
||||
"{{.}}",
|
||||
|
|
|
@ -328,7 +328,7 @@ And there, the same dynamic configuration in a KV Store (using `prefix = "traefi
|
|||
| Key | Value |
|
||||
|----------------------------------------------------|--------------------|
|
||||
| `/traefik/frontends/frontend2/backend` | `backend1` |
|
||||
| `/traefik/frontends/frontend2/passHostHeader` | `true` |
|
||||
| `/traefik/frontends/frontend2/passhostheader` | `true` |
|
||||
| `/traefik/frontends/frontend2/priority` | `10` |
|
||||
| `/traefik/frontends/frontend2/entrypoints` | `http,https` |
|
||||
| `/traefik/frontends/frontend2/routes/test_2/rule` | `PathPrefix:/test` |
|
||||
|
|
|
@ -53,7 +53,13 @@
|
|||
{{$entryPoints := GetList . "/entrypoints"}}
|
||||
[frontends."{{$frontend}}"]
|
||||
backend = "{{Get "" . "/backend"}}"
|
||||
{{ $passHostHeader := Get "" . "/passhostheader"}}
|
||||
{{if $passHostHeader}}
|
||||
passHostHeader = {{ $passHostHeader }}
|
||||
{{else}}
|
||||
# keep for compatibility reason
|
||||
passHostHeader = {{Get "true" . "/passHostHeader"}}
|
||||
{{end}}
|
||||
priority = {{Get "0" . "/priority"}}
|
||||
entryPoints = [{{range $entryPoints}}
|
||||
"{{.}}",
|
||||
|
|
Loading…
Reference in a new issue