combining map

Anoop Alias anoopalias01 at gmail.com
Thu Mar 9 07:01:55 UTC 2017


Hi,

I have 3 maps defined
############################
map $request_method $requestnocache {
    default 0;
    POST    1;
}

map $query_string $querystringnc {
    default 1;
    ""    0;
}

map $http_cookie $mccookienocache {
        default                     0;
        _mcnc                       1;
    }
###############################

I need to create a single variable that is 1 if either of the 3 above is 1
and 0 if all are 0. Will the following be enough

map "$requestnocache$querystringnc$mccookienocache" {
            default  0;
            ~1         1;
}



Thanks,
-- 
*Anoop P Alias*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170309/feced68a/attachment.html>


More information about the nginx mailing list