Skip to content

Reverse Proxy port rewriting for HTTP3xx Location headers #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jayv opened this issue Oct 19, 2012 · 6 comments
Closed

Reverse Proxy port rewriting for HTTP3xx Location headers #318

jayv opened this issue Oct 19, 2012 · 6 comments

Comments

@jayv
Copy link

jayv commented Oct 19, 2012

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
Copy link

@nodejitsu Any input on this?

@jayv
Copy link
Author

jayv commented Dec 8, 2012

I did write a patch that I should submit.

@amirhhz
Copy link

amirhhz commented Feb 21, 2013

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
Copy link
Author

jayv commented Feb 22, 2013

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

@jayv
Copy link
Author

jayv commented Feb 24, 2013

@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

@jcrugzz
Copy link
Contributor

jcrugzz commented Oct 30, 2015

This should be solved in the latest http-proxy. Please open a new issue if you see a problem

@jcrugzz jcrugzz closed this as completed Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants