Welcome! Log In Create A New Profile

Advanced

Re: Questions for X-Accel-Redirect

December 21, 2014 08:04PM
If you want to just pass the header through and not process it you can
use proxy_pass_header.

We do just this to pass X-Accel-Redirect though from server1 -> server2
where its then processed.
e.g.
proxy_pass_header X-Accel-Redirect

Hope this helps.

Regards
Steve
On 19/12/2014 06:52, Toshikuni Fukaya wrote:
> Hi,
>
> I have some questions for X-Accel-Redirect.
>
> Background: I use X-Accel-Redirect to send blob data from a second
> server (:8001 in below). I want to send headers from not only the second
> but also the first (:8000).
> Current nginx implementation, however, sends only headers from the
> second except some headers from the first, such as Content-Type.
>
> Question 1:
> Can I change this behavior to send headers from the first server
> together with ones from the second to a client?
>
> Question 2:
> If Q1 is acceptable, I hope to hide some headers by proxy_hide_header
> directive. Is this design ok for you?
>
> ### here is my example conf. ###
> server {
> listen 80 default_server;
> location / {
> proxy_pass http://localhost:8000/;
> }
> location /reproxy/ {
> proxy_pass http://localhost:8001/;
> }
> }
>
> server {
> listen 8000;
> location / {
> add_header x-accel-redirect /reproxy/;
> add_header foo 1;
> return 200;
> }
> }
>
> server {
> listen 8001;
> location / {
> add_header bar 1;
> return 200;
> }
> }
>
> Thanks,
> Toshikuni Fukaya
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel

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

Questions for X-Accel-Redirect

Toshikuni Fukaya 838 December 19, 2014 01:54AM

Re: Questions for X-Accel-Redirect

Maxim Dounin 351 December 19, 2014 07:12AM

Re: Questions for X-Accel-Redirect

Toshikuni Fukaya 325 December 21, 2014 08:00PM

Re: Questions for X-Accel-Redirect

steveh 512 December 21, 2014 08:04PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 232
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready