merely testing for $ssl_protocol breaks upstream proxy only with IE8

Francis Daly francis at daoine.org
Tue Oct 6 07:34:28 UTC 2015


On Mon, Oct 05, 2015 at 06:33:40PM -0400, rpriyana wrote:

Hi there,

>   location / {
>         set $unsafe 0;
>         if ($ssl_protocol = TLSv1) {
>                 set $unsafe 1;
>         }
>     proxy_intercept_errors on;
>     proxy_read_timeout  90;
>     try_files $uri $uri/index.html @proxy;
>     root  /var/nginx/www/bb2;
> 
>   }

https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/

You have "if" inside "location".

You seem to have the configuration that is in the section

# try_files wont work due to if

> When I try to access anything that is statically served, it is fine, but
> when I access anything proxied, I get a 404 on IE8 WinXP and some Win7,
> Other browsers are fine.

I suspect that "other browsers" is the difference between "if true" and
"if false".

Either way: it won't reliably do what you expect.

If you need $unsafe, set it outside of a location.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list