-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quotes added disabling a location #84
Comments
While the quotes may not be necessary for this regex pattern, crossplane is not changing the behavior of this configuration by including them. If the request is not matching then I suspect fault lies else where. Your expected behavior shows a pattern with the backslash to escape the "." stripped. Why do you expect that to happen? |
First thanks for answering, and full disclosure, I'm far from an nginx expert. But I've discovered that my php rule wasn't matching properly with the quotes and was working fine without them. Either way, if the original configuration doesn't have them, it'd be good for idempotence to have in and out matching I reckon, I'm happy to hear where I'm mistaken on this one. Also I don't expect the backslash to disappear, I forgot to double escape the second one while writing the report, I've fixed the original bug report with the backslash in the "expected" section, sorry about that. |
@PiTiLeZarD I tried out the config with and without quotes around Crossplane's build function is only intended to be idempotent as it pertains to the behavior of nginx. In other words, if you build a new config from a payload you previously parsed from an original config, the new config may look a bit different (e.g. indentation, blank lines, quotation), but nginx should act in exactly the same way when using either config. |
Describe the bug
I discovered while using crossplane that my locations weren't used by nginx due to quotes added in the build process
To Reproduce
Here is a quick python example showing what I mean:
This will output: location ~ '\.php$' {
Expected behavior
I expect it to output: location ~ \.php$ { (without the quotes)
Your environment
Additional context
I fixed my issue by using location labels @php but It's hardly a solution. I haven't looked into the source code yet, let me know if I can be of any help.
Not sure if this is related to this other issue: #82 if it is, you can close mine.
The text was updated successfully, but these errors were encountered: