10 messages in ru.sysoev.nginxRe: Custom headers with X-Accel-Redir...
FromSent OnAttachments
Alex EggDec 3, 2007 2:01 pm 
Igor SysoevDec 3, 2007 11:06 pm 
Thomas WittSep 11, 2008 3:52 pm 
mikeSep 11, 2008 4:58 pm 
Brendan SchwartzSep 22, 2008 2:34 pm 
Thomas WittOct 28, 2008 8:49 am 
Eden LiOct 28, 2008 2:03 pm 
Thomas WittNov 18, 2008 12:36 pm 
mikeNov 18, 2008 12:41 pm 
W. Andrew Loe IIIJan 9, 2009 12:45 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Custom headers with X-Accel-Redirect.Actions...
From:Thomas Witt (thom@infopark.de)
Date:Sep 11, 2008 3:52:18 pm
List:ru.sysoev.nginx

Igor Sysoev <is@...> 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

Yes.

Please Igor, expand this to regard at least the proxy_pass_header directive.

I've got a major problem with that which makes nginx for my project unusable:

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:

http://thread.gmane.org/gmane.comp.web.nginx.english/2301/ http://thread.gmane.org/gmane.comp.web.nginx.english/4201/

etc.

Regards,

Thomas