proxy_pass_header precedence over proxy_hide_header

Guzman Braso guzman.braso at gmail.com
Wed Mar 23 22:01:16 MSK 2011


Hi Everyone,

I just spent a lot of time fighting with a misterious problem with the
cache in one of our nginx servers.
Problem was found and thought it would be nice to share what happened
with everyone else so no one get into the same hole I went.

We have a file with all default proxy configuration which we include
in all our proxy_cache setups, then we only use the proxy directives
we need to change inside each site or location.

So if you globally set proxy_pass_header to allow cookies to go out
and then you want one location to don't pass cookies,
proxy_hide_header Set-Cookie won't be enough, cookies will pass
anyway.

The fix is to put proxy_pass_header off; before proxy_hide_header
Set-Cookie inside the location.

Hope it helps someone else...

Cheers from Uruguay



More information about the nginx mailing list