Hello Peter,
I think the variable name needs to begin $upstream.
In your example $upstream_http_x_foo is the x-foo response header from the upstream sending x-accel-redirect.
http://wiki.nginx.org/HttpUpstreamModule#.24upstream_http_.24HEADER
hth,
Matt
On Thursday, 8 August 2013, wrote:
Hello,
I'm having trouble passing custom headers over X-Accel-Redirect.
Eg. I set this upstream:
...redirect 302 etc.
X-Accel-Redirect: /internal/stuff
X-Foo: foobar
And have this in nginx.conf:
location ~ '/internal/stuff' {
internal;
proxy_set_header X-Foo $http_x_foo;
break;
}
...but in otherupstream I don't get an X-Foo header.
AFAICT the X-Accel Module doesn't pass on custom http headers it receives from upstream -- is that the case? Or am I doing it wrong?
cheers,
peter.
.
--
Matt Gray
API Developer
![]()
--
This email, including attachments, is private and confidential. If you have
received this email in error please notify the sender and delete it from
your system. Emails are not secure and may contain viruses. No liability
can be accepted for viruses that might be transferred by this email or any
attachment. Any unauthorised copying of this message or unauthorised
distribution and publication of the information contained herein are
prohibited. 7digital Limited. Registered office: 69 Wilson Street, London EC2A 2BB. Registered in
England and Wales. Registered No. 04843573.