Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Reverse Proxy port rewriting for HTTP3xx Location headers #318

jayv opened this Issue · 5 comments

3 participants


When receiving HTTP3xx server side redirects, the Location header is not entirely rewritten by the proxy, except for rewriting http to https, but in fact servername and port should be translated as well if they match the backend server and port, to make the process transparent to the browser.

So if the Location header contains http://backendhostname:backendport/foo/bar it should be rewritten to http://proxyhost:proxyport/foo/bar while still applying the http to https conversion as currently implemented.


@nodejitsu Any input on this?


I did write a patch that I should submit.


Would also like to +1 this, especially if someone has a potential fix already (@jayv ?). I came across this issue when using Testacular which relies on http-proxy for http forwarding.


I have a fix that solved my Testacular issues, let me see if I can send you a patch.


@Dignifiedquire @amirhhz I've submitted a pull request that I wrote a couple months ago:


You can install my node-http-proxy fork and link to that one from Testacular, it's how we currently run our tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.