Merge pull request #3194 from bshelton229/literal-dollar-character

Make literal $ character work in set $location_path
This commit is contained in:
k8s-ci-robot 2018-10-09 15:52:39 -07:00 committed by GitHub
commit f56ab42cd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 1 deletions

View file

@ -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;
@ -913,7 +919,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 | escapeLiteralDollar }}";
{{ if $all.Cfg.EnableOpentracing }}
opentracing_propagate_context;