Welcome! Log In Create A New Profile

Advanced

Re: Skipping the proxy cache based on a cookie?

January 21, 2011 04:17PM
OK finally figured it out I think.

Seems it may be to do with the scope of the user set variables (not sure) but after moving adding proxy_no_cache and proxy_cache_bypass to the same location instead of the centrally called ones, It seems to be working as expected.

The hint was in agentzh's original post

location / {
set_by_lua $no_cache '
if ngx.var.cookie_COOKIE == "" or ngx.var.cookie_COOKIE == nil then
return 1
end
return ""
';
[b]proxy_cache_bypass $no_cache;[/b]
proxy_pass ...
}
Subject Author Posted

Skipping the proxy cache based on a cookie?

ehudros2 December 29, 2010 09:15AM

Re: Skipping the proxy cache based on a cookie?

ehudros2 December 30, 2010 08:27AM

Re: Skipping the proxy cache based on a cookie?

Dayo January 01, 2011 10:52AM

Re: Skipping the proxy cache based on a cookie?

ehudros2 January 02, 2011 07:28AM

Re: Skipping the proxy cache based on a cookie?

Dayo January 18, 2011 04:34PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 18, 2011 05:00PM

Re: Skipping the proxy cache based on a cookie?

agentzh January 19, 2011 11:08PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 20, 2011 03:38PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 18, 2011 05:18PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 01:44PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 01:45PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 02:06PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 02:07PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 05:19PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 02:58PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 04:49PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 03:20PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 03:43PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 19, 2011 04:22PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 04:10PM

Re: Skipping the proxy cache based on a cookie?

Eugaia January 19, 2011 04:30PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 04:36PM

Re: Skipping the proxy cache based on a cookie?

António P. P. Almeida January 19, 2011 08:30PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 20, 2011 03:08PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 21, 2011 03:51PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 21, 2011 03:52PM

Re: Skipping the proxy cache based on a cookie?

Dayo January 21, 2011 04:17PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 183
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