feat(kv): add frontend redirect configuration.
This commit is contained in:
parent
40b59da224
commit
cfa1f47226
4 changed files with 99 additions and 0 deletions
|
@ -70,6 +70,14 @@
|
|||
"{{.}}",
|
||||
{{end}}]
|
||||
|
||||
{{$redirect := getRedirect $frontend }}
|
||||
{{ if $redirect }}
|
||||
[frontends."{{$frontendName}}".redirect]
|
||||
entryPoint = "{{ $redirect.EntryPoint }}"
|
||||
regex = "{{ $redirect.Regex }}"
|
||||
replacement = "{{ $redirect.Replacement }}"
|
||||
{{end}}
|
||||
|
||||
{{range $route := List $frontend "/routes/"}}
|
||||
[frontends."{{$frontendName}}".routes."{{Last $route}}"]
|
||||
rule = "{{Get "" $route "/rule"}}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue