You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
The emerging support for regex paths is really awesome! Thanks @zrdaley . We've been using a custom template in testing to achieve this so far and are really happy to know we'll be able to avoid that. We have a couple paths that contain $ in the regex pattern. For example, we have one called "homepage" which only receives traffic from /, in which case we're using /$ to end up with location ~* "^/$" {.....
When there is a $ character in path it causes nginx errors from the following template declaration - set $location_path "{{ $location.Path }}"; because nginx variables can't contain $. I've yet to be able to find a way to escape an actual $ character in an nginx variable. I'll open a PR with what we're currently doing in testing to get this working in order to get a conversation started.
What you expected to happen:
It would be nice to support $ in regex enabled paths and have the $location_path nginx variable contain something escaped in some way.
How to reproduce it (as minimally and precisely as possible):
Fulfilling an ingress resource with a path containing a $ should be enough to reproduce the issue.
I've been building master. I'm currently seeing this from b46523a. Before the regex work landed in master we were using a custom template that did something similar to what's now done in the controller and ran into this same issue there. Given we were using a custom template we just removed that set as we didn't need the variable.
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
NGINX Ingress controller version: unreleased
Kubernetes version (use
kubectl version
): 1.10Environment:
uname -a
): 4.14.62-70.117.amzn2.x86_64What happened:
The emerging support for regex paths is really awesome! Thanks @zrdaley . We've been using a custom template in testing to achieve this so far and are really happy to know we'll be able to avoid that. We have a couple paths that contain
$
in the regex pattern. For example, we have one called "homepage" which only receives traffic from/
, in which case we're using/$
to end up withlocation ~* "^/$" {....
.When there is a
$
character in path it causes nginx errors from the following template declaration -set $location_path "{{ $location.Path }}";
because nginx variables can't contain$
. I've yet to be able to find a way to escape an actual$
character in an nginx variable. I'll open a PR with what we're currently doing in testing to get this working in order to get a conversation started.What you expected to happen:
It would be nice to support
$
in regex enabled paths and have the$location_path
nginx variable contain something escaped in some way.How to reproduce it (as minimally and precisely as possible):
Fulfilling an ingress resource with a path containing a
$
should be enough to reproduce the issue.This should fail to reload or boot nginx with an error like:
2018/10/05 18:00:59 [emerg] 95#95: invalid variable name in /tmp/nginx-cfg577284661:398
Anything else we need to know:
The text was updated successfully, but these errors were encountered: