map directive doubt

Anoop Alias anoopalias01 at gmail.com
Thu Mar 9 05:31:38 UTC 2017


Hi,

Just have  a doubt in map directive

map $http_user_agent $upstreamname {
default desktop;
~(iPhone|Android) mobile;
}

is correct ?

########################

or does the regex need to fully match the variable?

map $http_user_agent $upstreamname {
default desktop;
~*.*Android.*   mobile;
                ~*.*iPhone.*     mobile;
}





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


More information about the nginx mailing list