Hello,
​
On Mon, Nov 17, 2014 at 7:16 AM, mex <[email protected]> wrote:

> map $http_user_agent $ios8_ua {
>     default       0;
>     "YOUR_REGEX_HERE" 1;
> }
>
> and then use the evil IF:
>
> if ($ios_ua) {
>     keepalive_timout 0;
> }
>

​I would do even better by avoiding using 'if'​
​ at all:

map $http_user_agent $keepalive_timeout {
    default 75s; # Put here the wanted default value (taken from
keepalive_timeout
<http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout>
docs)
    *regex* 0;
    *for* 0;
    *blacklisted* 0;
    *user agents* 0;
}​

keepalive_timeout $keepalive_timeout; # At http, server or location level,
as docs state
---
*B. R.*​
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to