<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 28, 2015 at 9:17 AM, mayamatakeshi <span dir="ltr"><<a href="mailto:mayamatakeshi@gmail.com" target="_blank">mayamatakeshi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hello, my upstream server replies with this:</div><div><br></div><div><div>HTTP/1.1 200 OK.</div><div>Server: test.</div><div>Date: Sat, 28 Nov 2015 00:05:55 GMT.</div><div>Content-Type: application/json.</div><div>Content-Length: 0.</div><div>Connection: close.</div><div>X-ExtraInfo: domain_name=<a href="http://test1.com" target="_blank">test1.com</a>;domain_id=1000;user_name=user1;user_id=10001001.</div><div>X-Accel-Redirect: /internal_redirect/<a href="http://192.168.2.153:7777" target="_blank">192.168.2.153:7777</a>.</div><div>Access-Control-Allow-Origin: <a href="https://192.168.2.153:445" target="_blank">https://192.168.2.153:445</a>.</div><div>Access-Control-Allow-Credentials: true.</div><div><br></div><div>which I handle with this:</div><div><br></div><div>location ~ ^/internal_redirect/(.*) {</div><div>    internal;</div><div>    proxy_pass http://$1$is_args$args;</div><div>}</div><div><br></div><div>However, I want to pass X-ExtraInfo to the target upstream server so i tried:</div><div>  proxy_set_header               X-ExtraInfo                     $sent_http_x_extrainfo;<br></div><div>and even:<br></div><div>  proxy_set_header               X-ExtraInfo                     $http_x_extrainfo;<br></div><div>but none of them worked.<br></div><div>So, is there a way to get headers from X-Accel-Redirect replies?</div></div><div><br></div><div>Obs: I can workaround this passing the ExtraInfo as arguments in the target URL but I want try to rely on the current interface of the target upstream server.</div><div><br></div></div></blockquote><div><br></div><div>Hello,</div><div>I have found the solution in the openresty google group:</div><div><a href="https://groups.google.com/d/msg/openresty-en/vPxQFntAfCc/VcCv1bhLeLsJ">https://groups.google.com/d/msg/openresty-en/vPxQFntAfCc/VcCv1bhLeLsJ</a> </div><div>Regards,</div><div>Takeshi</div></div></div></div>