Proxy_cache and internal redirect

Hello.
Can you please tell how to enable caching of responses with
‘X-Accel-Redirect’ headers.
Nick.

Hello!

On Thu, Feb 28, 2013 at 03:50:19PM +0400, Nick wrote:

Hello.
Can you please tell how to enable caching of responses with ‘X-Accel-Redirect’
headers.
Nick.

You may do so by using

proxy_ignore_headers X-Accel-Redirect;

This will prevent nginx from doing a redirect based on
X-Accel-Redirect though.

See http://nginx.org/r/proxy_ignore_headers for details.


Maxim D.
http://nginx.org/en/donation.html

But, I want use both redirect and save response with ‘X-Accel-Redirect’
in cache to prevent multiple requests to backend.

NIck

Четверг, 28 февраля 2013, 20:35 +04:00 от Maxim D.
[email protected]:

Hello!

On Fri, Mar 01, 2013 at 11:06:54AM +0400, Nicholas Kostirya wrote:

But, I want use both redirect and save response with
‘X-Accel-Redirect’ in cache to prevent multiple requests to
backend.

You have to select just one, either X-Accel-Redirect handling or
cache. As a workaround you may try doing another proxy layer with
cache and X-Accel-Redirect ignored.

Nick.

Maxim D.
http://nginx.org/en/donation.html


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx


Maxim D.
http://nginx.org/en/donation.html

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs