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

On Tue, Oct 6, 2015 at 9:34 AM, Francis Daly <[email protected]> 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        [email protected]
>
> _______________________________________________
> nginx mailing list
> [email protected]
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to