How to access query parameter names with '-' in it
francis at daoine.org
Wed Nov 12 22:43:53 UTC 2014
On Wed, Nov 12, 2014 at 03:38:03AM -0500, sudarshan wrote:
> If query parameters in the request looks like this
> I can access 'param_name' as $arg_param_name. How do I access 'param-name'
> though? $arg_param-name will not work since as far as nginx is concerned the
> variable name ends at $arg_param. Is there a workaround for this case? Has
> anyone else run into a similar problem?
If you want to avoid embedded languages, you could match-and-extract
from $args, either with a map or an if, to set your variable name to
the matching value in "&?param-name=([^&]*)".
But it might be less work to change the input to restrict itself to
Francis Daly francis at daoine.org
More information about the nginx