atom feed6 messages in ru.sysoev.nginxRe: Cookie problem with proxy cache
FromSent OnAttachments
Ole LaursenNov 16, 2009 1:25 pm 
Emanuele PucciarelliNov 17, 2009 9:51 am 
Jérôme LoyetNov 17, 2009 10:12 am 
Gabriel RamugliaNov 17, 2009 10:56 am 
Ole LaursenNov 18, 2009 12:41 pm 
Gabriel RamugliaNov 18, 2009 1:40 pm 
Subject:Re: Cookie problem with proxy cache
From:Emanuele Pucciarelli (lis@ruby-forum.com)
Date:Nov 17, 2009 9:51:23 am
List:ru.sysoev.nginx

Ole Laursen wrote:

I've fixed the problem by adding a proxy_pass_header Set-Cookie. But I guess the root of the problem is that nginx thinks it can cache the page in spite of the "Vary: cookie" header. Isn't this a bug?

I'm wondering too how to use proxy_cache correctly. I've added "proxy_set_header Cookie $http_cookie;" and I have also made sure that $http_cookie is part of the proxy_cache_key, or nginx would return cached pages (meant for a specific user who had previously logged in) for any request.

I guess that I'd like NOT to cache any responses whose request included a Cookie: header, but proxy_cache cannot work in a conditional section, and I guess that there's a good reason for that.

I'd truly appreciate guidance on this subject.

Thanks!