<div dir="ltr">Hi,<div><br></div><div>One URL redirects to @streams location:</div><div><br></div><div><div>HTTP/1.0 200 OK</div><div>expires: 0</div><div>cache-control: no-cache, no-store, must-revalidate</div><div>x-accel-redirect: @streams </div><div>Content-Type: text/html; charset=utf-8</div><div>Status: 200</div><div>x-real-location: /stream/?user_id=153847603&lang=RU</div><div>pragma: no-cache</div><div><br></div><div>@streams</div><div><br></div><div>Location looks like this:</div><div><br></div><div><div>location @streams {</div><div> proxy_set_header X-Real-IP $header_ip;</div><div> ... more proxy sets...</div><div> proxy_set_header X-Y ttt$upstream_http_x_real_location$upstream_http_status;<br></div><div> proxy_set_header X-Z ttt$http_x_real_location;</div><div> proxy_pass <a href="http://streams-backend">http://streams-backend</a>$upstream_http_x_real_location;</div><div>}</div></div><div><br></div><div>However, $upstream_http_x_real_location variable is empty and request reaches backed with original URL.</div><div><br></div><div><div>GET /core/user/stream/ HTTP/1.0</div><div>...</div><div>X-Y: ttt<br></div><div>X-Z: ttt</div></div><div><br></div><div><br></div><div>Tested with nginx 1.8.0 and 1.10.2 with the same outcome.</div><div><br></div><div>Is it a bug? Misconfiguration on my side? Any workarounds available?</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Руслан Закиров</div><div>Руководитель отдела разработки веб-сервисов</div><div><span>+7(916) 597-92-69</span>, <span>ruz @ <a href="http://www.sports.ru/" target="_blank"><img src="http://farm7.static.flickr.com/6235/6210250811_19a888dbba_o.jpg" width="43" height="14" style="vertical-align: bottom; margin-right: 0px;"></a></span></div></div></div>
</div></div>