1
0
Fork 0

feat(consulcatalog): add frontend redirect tags.

This commit is contained in:
Fernandez Ludovic 2018-01-01 04:03:29 +01:00 committed by Traefiker
parent 97ce77169a
commit 170fc13e02
3 changed files with 90 additions and 0 deletions

View file

@ -67,6 +67,14 @@
"{{.}}",
{{end}}]
{{ $redirect := getRedirect $service.Attributes }}
{{if $redirect }}
[frontends."frontend-{{ $service.ServiceName }}".redirect]
entryPoint = "{{ $redirect.EntryPoint }}"
regex = "{{ $redirect.Regex }}"
replacement = "{{ $redirect.Replacement }}"
{{end}}
[frontends."frontend-{{$service.ServiceName}}".routes."route-host-{{$service.ServiceName}}"]
rule = "{{ getFrontendRule $service }}"