QNs about cookies and caching

Peter Booth peter_booth at me.com
Tue Mar 5 18:46:13 UTC 2013


I'm wondering if someone can help with the following? I have a java app where I'm using nginx as a caching reverse proxy. I have a location defined for five distinct JSPs and different cache configurations and custom keys for each. Some locations are using:
proxy_ignore_headers Set-Cookie
Proxy_pass_header off
proxy_hide_header Set-Cookie

To ensure that responses that set cookies can be safely cached without returning responses that set cookies. 

Any of these JSPs could possibly create a backend session if the client doesn't pass a jsessionid cookie.

I'd really like to get a different behavior whereby if a response from the backend includes a Set-Cookie then the response is cached without the Set-Cookie but the original caller does see the Set-Cookie header. Is this possible with some lua or other trickery?

Peter

Sent from my iPhone


More information about the nginx mailing list