Re: Hashes / Arrays für $arg_PARAMETER

Jonathan Matthews contact at
Thu Jul 25 10:03:55 UTC 2013

On 24 Jul 2013 21:30, "Maik Unger" <lists at> wrote:
> Hello @all,
> Is it possible to define array / hashes in nginx? I have the following
> idea:
> nginx should check $arg_PARAMETER which is defined by an array. If the
> right element in the array, then die access is permitted, otherwise
> denied.
> example:
> the $arg_PARAMETER can have the following values:
> "ab" or "bc" or cd"
> if $arg_PARAMATER != array -> Access is denied, otherwise permitted

$arg_* are strings because they derive from the query string.  They are not
arrays. You can interpret these strings using any of the methods nginx
gives you.

> I would appreciate about a solution.

I suggest you'll have to concoct a solution using nginx maps with regular
expressions. That's a very powerful method of switching behaviours based on
user input. Have a Google for their docs and for interesting ways of using

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list