Disable keep_alive based on specific useragent

mex nginx-forum at nginx.us
Mon Nov 17 06:16:51 UTC 2014


Hi Robert, 

you could probably work around this issues with map / if:

map $http_user_agent $ios8_ua {
    default       0;
    "YOUR_REGEX_HERE" 1;
}

and then use the evil IF:

if ($ios_ua) {
    keepalive_timout 0;
}




http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#if
http://nginx.org/en/docs/http/ngx_http_map_module.html


cheers, 


mex

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



More information about the nginx mailing list