Take the 2-minute tour ×  I've been at this for hours and I
can't figure out a clean solution.  Basically, I have an nginx
proxy setup, which works really well, but I'd like to handle a
few urls more manually. Specifically, there are 2-3 locations
for which I'd like to set proxy_ignore_headers to Set-Cookie to
force nginx to cache them (nginx doesn't cache responses with
Set-Cookie as per
http://wiki.nginx.org/HttpProxyModule#proxy_ignore_headers).  So
for these locations, all I'd like to do is set
proxy_ignore_headers Set-Cookie;  I've tried everything I could
think of outside of setting up and duplicating every config
value, but nothing works.  I tried:    • Nesting location
directives, hoping the inner location which matches on my files
would just set this value and inherit the rest, but that wasn't
the case - it seemed to ignore anything set in the outer
location, most notably proxy_pass and I end up with a 404).   •
Specifying the proxy_cache_valid directive in an if block that
matches on $request_uri, b