Skipping the proxy cache based on a cookie?

Dayo nginx-forum at
Thu Jan 20 01:19:53 MSK 2011

I throw my hands up in surrender as I just can't get it to return the

I have tried a plain vanilla build with no joy.


The relevant location code is ...

	location /folder/ {
		if ($http_cookie !~* "COOKIEX=0") {
			add_header Cookie "COOKIEX=1;; path=/folder/";
		# BEGIN Url Rewrites	
		# END Url Rewrites
		try_files $uri $uri/ @proxy;

Posted at Nginx Forum:,161969,167714#msg-167714

More information about the nginx mailing list