Welcome! Log In Create A New Profile

Advanced

Re: X-Accel-Redirect to keep Etag from upstream?

Maxim Dounin
June 10, 2011 09:52AM
Hello!

On Fri, Jun 10, 2011 at 08:23:45AM -0400, unbeknownst wrote:

> I'm using nginx 1.0.0 and I wonder if there is any way of telling
> "X-Accel-Redirect" to keep the "Etag" header.
> The rest of the headers from upstream are kept when I set
> "X-Accel-Redirect" but "Etag" seems to be removed.

There are several headers which are kept on X-Accel-Redirect:

"Content-Type", "Set-Cookie", "Content-Disposition",
"Cache-Control", "Expires", "Accept-Ranges"

Others aren't kept by default. If you want to keep them, try
something like

add_header Etag $upstream_http_etag;

in the location your X-Accel-Redirect points to.

(if you proxy_pass to another server after X-Accel-Redirect, you
will have to save $upstream_http_etag to temporary variable via set
directive, but this is another story)

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

X-Accel-Redirect to keep Etag from upstream?

unbeknownst June 10, 2011 08:23AM

Re: X-Accel-Redirect to keep Etag from upstream?

Maxim Dounin June 10, 2011 09:52AM

Re: X-Accel-Redirect to keep Etag from upstream?

unbeknownst June 10, 2011 10:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 105
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready