Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Reverse Proxy port rewriting for HTTP3xx Location headers #318

Open
jayv opened this Issue · 5 comments

3 participants

@jayv

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.

@Dignifiedquire

@nodejitsu Any input on this?

@jayv

I did write a patch that I should submit.

@amirhhz

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.

@jayv

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

@jayv

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

#376

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

https://github.com/jayv/node-http-proxy

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.