1
0
Fork 0

feat(kv): add error pages configuration.

This commit is contained in:
Fernandez Ludovic 2018-01-03 16:39:37 +01:00 committed by Traefiker
parent cfa1f47226
commit 51390aa874
4 changed files with 98 additions and 0 deletions

View file

@ -78,6 +78,19 @@
replacement = "{{ $redirect.Replacement }}"
{{end}}
{{ $errorPages := getErrorPages $frontend }}
{{ if $errorPages }}
[frontends."{{$frontendName}}".errors]
{{ range $pageName, $page := $errorPages }}
[frontends."{{$frontendName}}".errors.{{ $pageName }}]
status = [{{range $page.Status}}
"{{.}}",
{{end}}]
backend = "{{$page.Backend}}"
query = "{{$page.Query}}"
{{end}}
{{end}}
{{range $route := List $frontend "/routes/"}}
[frontends."{{$frontendName}}".routes."{{Last $route}}"]
rule = "{{Get "" $route "/rule"}}"