merely testing for $ssl_protocol breaks upstream proxy only with IE8

B.R. reallfqq-nginx at yahoo.fr
Tue Oct 6 14:08:29 UTC 2015


maps are a good way of conditionally setting variables' value.
---
*B. R.*

On Tue, Oct 6, 2015 at 9:34 AM, Francis Daly <francis at daoine.org> wrote:

> 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
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151006/e2281025/attachment.html>


More information about the nginx mailing list