Custom headers with X-Accel-Redirect.
thomas.witt at infopark.de
Fri Sep 12 02:52:41 MSD 2008
Igor Sysoev <is at ...> writes:
> On Mon, Dec 03, 2007 at 02:02:13PM -0800, Alex Egg wrote:
> > This is my understanding according to this:
> > http://wiki.codemongers.com/NginxXSendfile
> > Nginx will ignore any additional headers you pass along, except
> > for the list below, with your response?
> > Content-Type
> > Content-Disposition
> > Accept-Ranges
> > Set-Cookie
> > Cache-Control
> > Expires
Please Igor, expand this to regard at least the proxy_pass_header
I've got a major problem with that which makes nginx for my project
Let me explain why: I'm delivering PDF files out of a rails
application, and I'm using X-Accel-Redirect. I have to send a special
header for Google with it (X-Robots-Tag: noarchive) in order to
disallow archiving for Google. Also I'm sometimes sending a
X-Robots-Tag: unavailable_after to automatically remove files from
Googles index after a certain date.
I don't have any possibility to pass these headers when using
X-Accel-Redirect (which I HAVE to, because otherwise the downloads of
the files would block my app).
In my opinion this special handling of headers makes no sense - when
using a normal upstream you can pass any header you want to. Why don't
to so when using X-Accel-Redirect.
I'd really appreciate a response - because otherwise I have to turn
back to Apache which would be a big mess.
There are quite a few threads from people who have the same problem:
More information about the nginx