Is it possible to get headers from X-Accel-Redirect reply

Hello, my upstream server replies with this:

HTTP/1.1 200 OK.
Server: test.
Date: Sat, 28 Nov 2015 00:05:55 GMT.
Content-Type: application/json.
Content-Length: 0.
Connection: close.
X-ExtraInfo: domain_name=test1.com
;domain_id=1000;user_name=user1;user_id=10001001.
X-Accel-Redirect: /internal_redirect/192.168.2.153:7777.
Access-Control-Allow-Origin: https://192.168.2.153:445.
Access-Control-Allow-Credentials: true.

which I handle with this:

location ~ ^/internal_redirect/(.*) {
internal;
proxy_pass http://$1$is_args$args;
}

However, I want to pass X-ExtraInfo to the target upstream server so i
tried:
proxy_set_header X-ExtraInfo
$sent_http_x_extrainfo;
and even:
proxy_set_header X-ExtraInfo
$http_x_extrainfo;
but none of them worked.
So, is there a way to get headers from X-Accel-Redirect replies?

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.

Regards,
Takeshi

On Sat, Nov 28, 2015 at 9:17 AM, mayamatakeshi [email protected]
wrote:

X-Accel-Redirect: /internal_redirect/192.168.2.153:7777.
However, I want to pass X-ExtraInfo to the target upstream server so i
target URL but I want try to rely on the current interface of the target
upstream server.

Hello,
I have found the solution in the openresty google group:
https://groups.google.com/d/msg/openresty-en/vPxQFntAfCc/VcCv1bhLeLsJ
Regards,
Takeshi