map within a map

itpp2012 nginx-forum at nginx.us
Thu Oct 23 21:48:09 UTC 2014


Igor Sysoev Wrote:
-------------------------------------------------------
> You can try other path:
> 
> map $ngxvar1  $myvar1 {
>    default   $myvar2;
>    ~*string  1;
> }
> 
> 
> map $ngxvar2  $myvar2 {
>    default   0;
>    ~*string  1;
> }

tnx Igor, this works to:

map $ngxvar1 $myvar1 {
default 0;
~*string 1;
}
map $ngxvar2 $myvar2 {
default 0;
~*string 1;
}

map $myvar1$myvar2 $result1 {
default 0;
~1 1;
}

if ($result1) { return 403; }

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,254226,254231#msg-254231



More information about the nginx mailing list