Specifically I was writing that clients could get their cookies, but not served form the nginx cache. This has always been about whether or not the cached page was serving the cookies or not. With the exact same configuration for the cache, there is a difference between: location / and location /~home.html in regards to whether or not the cached version of the page has the Set-Cookby john_smith77 - Nginx Mailing List - English
So I found a solution and it seems like there is unexpected behavior from nginx. proxy_hide_header Set-Cookie does not seem to work when the location block is set to / So: location / { #Lots of other proxy stuff here...... proxy_hide_header "Set-Cookie"; } does not allow a cookie to ever be set, but: location ~home.html { #Lots of other proxy stuff hereby john_smith77 - Nginx Mailing List - English
Indeed, but that prevents all cookies from being set. What I am looking for is to have a cache hit, but have the set-cookie served from the origin server. In Apache httpd cache, this can be accomplished with CacheIgnoreHeaders Set-Cookie. The back end server here is Apache and I have tried setting it to send back this header: Cache-Control:no-cache="set-cookie" There just doesby john_smith77 - Nginx Mailing List - English
Thanks for the info. I have removed the redundant config. I suppose what I am really getting at is that I would like Set-Cookie to never be cached with a cache MISS so that the cached cookie values are then not there for subsequent HITS.by john_smith77 - Nginx Mailing List - English
I am trying to cache the home page to a site. I am only caching the home page. If I put in a condition to check for cookies existing before caching, everything works as expected, but there is a high BYPASS rate due to the client not having the cookies the first time they visit the site. Once I took out the check for cookies, clients started getting cached cookies from other users. Is there a way tby john_smith77 - Nginx Mailing List - English