Failing to cache requests
Francis Daly
francis at daoine.org
Sun Sep 22 20:07:43 UTC 2019
On Sun, Sep 22, 2019 at 09:37:51AM -0500, Andrei wrote:
Hi there,
> Thanks for the confirmation! Is there a way to selectively ignore only
> specific "set-cookie"/cookies, versus all "set-cookie" headers to force
> cache?
Not that I am aware of, for proxy_cache.
> Or even better to remove/strip certain cookies with a regex match?
Not that I am aware of.
If you do find a way, and it happens too late to affect proxy_cache,
then you can possibly get around that by doing two proxy_pass'es --
one with caching to another, which strips the Set-Cookie headers that
you don't want to see after proxy_pass'ing to the "real" upstream.
But you may be better off configuring the upstream server not to send
the Set-Cookie header that you don't want.
That would presumably be more reliable, if it is doable.
Good luck with it,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list