Make literal $ character work in set $location_path
This commit is contained in:
parent
be5b86fa8f
commit
3dc131bd57
3 changed files with 35 additions and 1 deletions
|
|
@ -347,6 +347,12 @@ http {
|
|||
}
|
||||
{{ end }}
|
||||
|
||||
# Create a variable that contains the literal $ character.
|
||||
# This works because the geo module will not resolve variables.
|
||||
geo $literal_dollar {
|
||||
default "$";
|
||||
}
|
||||
|
||||
server_name_in_redirect off;
|
||||
port_in_redirect off;
|
||||
|
||||
|
|
@ -970,7 +976,7 @@ stream {
|
|||
set $ingress_name "{{ $ing.Rule }}";
|
||||
set $service_name "{{ $ing.Service }}";
|
||||
set $service_port "{{ $location.Port }}";
|
||||
set $location_path "{{ $location.Path }}";
|
||||
set $location_path "{{ $location.Path | escapeLocationPathVar }}";
|
||||
|
||||
{{ if $all.Cfg.EnableOpentracing }}
|
||||
opentracing_propagate_context;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue