<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I'm trying to create a sinle proxying configuration as following:<br><br>location = /proxy {<br>        resolver 8.8.8.8;<br>        proxy_pass $args;<br>
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_redirect "" $uri?;<br>}<br><br></div>e.g. <a href="http://example.com/proxy?http://example2.com/">http://example.com/proxy?http://example2.com/</a> would deliver the contents/headers of <a href="http://example2.com/">http://example2.com/</a> . If <a href="http://example2.com/">http://example2.com/</a> replies with<br>
<br></div>Location: <a href="http://example3.com/">http://example3.com/</a><br><br></div>, the client gets<br><br></div>Location: <a href="http://example.com/proxy?http://example3.com/">http://example.com/proxy?http://example3.com/</a><br>
<br></div>, so it works as expected. However, i've got <a href="http://example2.com">example2.com</a> replying with relative Location, e.g.:<br><br></div>Location: /some/path<br><br></div>This results in client getting:<br>
<br>Location: <a href="http://example.com/proxy?/some/path">http://example.com/proxy?/some/path</a><br><br></div>, something that won't work. Is there any way to make it work for client to get<br><br>Location: <a href="http://example.com/proxy?http://example2.com/some/path">http://example.com/proxy?http://example2.com/some/path</a><br>
<br>?<br></div>