Skipping the proxy cache based on a cookie?

António P. P. Almeida appa at
Wed Jan 19 23:10:43 MSK 2011

On 19 Jan 2011 19h58 WET, nginx-forum at wrote:

> I think I am getting closer and hope someone can nudge me across the
> line.
> My set up is now ...
> [code]
> if ($http_cookie !~* "mycookie=0") {
> 	add_header Cookie: "mycookie=1";
> }
> [/code]

IIRC you *want* to bust the proxy cache. Right? So,

If you want a header do as describe, this if you don't want to cache
the response. If not use a cache busting variable, to force a refresh.

--- appa

More information about the nginx mailing list