Is there any way to access upstream response from configuration?

Francis Daly francis at daoine.org
Sun May 25 19:06:05 UTC 2014


On Sun, May 25, 2014 at 02:19:16PM -0400, aldem wrote:

Hi there,

> I am trying to make caching selective based on cookies set by upstream.

http://nginx.org/r/proxy_no_cache

> Is this possible at all? I couldn't find anything (like variables) that
> allows to examine response for this purpose.

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables

If you specifically care about cookies, it will likely be easier if
you use 1.7.1 or newer. If you merely care about response headers,
then older versions will work too.

You may find it useful to use "map" too.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list