Literal dollar signs in values
roy-orbison at devo.net.au
roy-orbison at devo.net.au
Wed Apr 21 02:17:10 UTC 2021
Hi,
I can't find an existing bug on this, and don't have a recent version
handy to test on, so I'm asking here first: Is it still impossible to
insert a literal dollar symbol in a config value?
I was debugging nested location config with a statement like so:
return 200 'loc /foo/bar/ \.xyz$ $uri';
This caused an "[emerg] invalid variable name" error when testing the
config. Apparently a known issue that's documented at
https://github.com/openresty/nginx-tutorials/blob/9f7242b60f9f95bd840ec54388f83a17e3407ee3/en/01-NginxVariables01.tut#L93
but the workaround is very hacky.
If this is not resolved already, could this be done in a
backwards-compatible manner by nginx interpreting "$$" as a literal "$"?
Regards,
Roy.
More information about the nginx-devel
mailing list