Passing extra headers along with a X-Accel-Redirect
anup.shkl at gmail.com
Fri Apr 4 17:52:01 MSD 2008
Joaquin Cuenca Abela wrote:
> I have a backend in PHP that is using X-Accel-Redirect to make nginx
> send a file. Along with that file, I have to set up some headers, with
> content that will be decided by the PHP backend. If I just add a
> header in PHP, nginx eats it. Is there anyway to pass an extra header
> from PHP to the end client?
AFAIK, nginx does not eat up the headers.
Most probably your headers from php are being overridden by the
headers sent by the proxied server.
You many use proxy_hide_header directive to suppress headers from
the proxied server. This will preserve the headers from your php.
:: Just to fix some stupid spelling mistakes.
More information about the nginx