Welcome! Log In Create A New Profile

Advanced

Re: Response Header IF statement problem

Roman Arutyunyan
February 14, 2018 10:02AM
Hi Michael,

On Wed, Feb 14, 2018 at 02:09:57PM +0000, Friscia, Michael wrote:
> I’m at a loss on this. I am working on a cache problem where some pages need to be bypassed and others will be cached. So the web server is adding a response header (X-Secured-Page). I’ve tried multiple combinations of
> $http_x_secured_page and $sent_http_x_secured_page and even though I see the header when I inspect the page, the IF statements inside the location block are not getting fired off.
>
> What could I possibly be doing wrong?

If you want to disable caching for a specific response, you can use the
proxy_no_cache directive. Pass it $upstream_http_x_secured_page if you want
to disable caching of responses having this HTTP header.

Using "if" directive for analyzing output headers like $sent_http_x_secured_page
will not work since "if" is evaluated at an early request processing stage
(rewrite phase) and no output is normally created by this time.

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Response Header IF statement problem

wickedhangover February 14, 2018 09:12AM

Re: Response Header IF statement problem

Roman Arutyunyan February 14, 2018 10:02AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 10:04AM

Re: Response Header IF statement problem

webopsx February 14, 2018 10:08AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 04:04PM

Re: Response Header IF statement problem

webopsx February 14, 2018 04:39PM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 04:46PM

Re: Response Header IF statement problem

pbooth February 14, 2018 05:16PM

Re: Response Header IF statement problem

wickedhangover February 15, 2018 08:04AM

Re: Response Header IF statement problem

wickedhangover February 15, 2018 08:24AM

Re: Response Header IF statement problem

Francis Daly February 16, 2018 07:38AM

Re: Response Header IF statement problem

wickedhangover February 16, 2018 08:52AM

Re: Response Header IF statement problem

Francis Daly February 16, 2018 10:40AM

Re: Response Header IF statement problem

webopsx February 14, 2018 10:03AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 10:18AM

Re: Response Header IF statement problem

webopsx February 14, 2018 05:07PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready