You can clone with
The pull req #165 introduced broken logic, it rewrites every redirect, such that if a proxied services 302's any url (in our instance, our https-fronted and http-back-end sends a redirect to instagram's http cdn).
It rewrites every single redirect regardless :(
It also breaks redirects to other protocols (however uncommon that is).
@quartzjer How would you go about fixing it? Honestly I'm not sure I follow what's wrong.
If there's a front-end of https://external/ and a back-end of http://internal/ when the back-end sends a redirect to http://some-other-site.com/foo.bar this code will rewrite it to https://sime-other-site.com/foo.bar, which is generally a bad thing to be rewriting every redirect :)
I honestly don't understand the original issue to suggest a fix as I'm not sure what the desired behavior would be, all I know is the current one is not desirable.
Is there any way this can be fixed in master? I'm (undesirably) using a fork that just has this code commented out, and I don't know how this condition isn't horribly broken for everyone, every single redirect response is rewritten in this case.
@quartzjer -> You could create a clean pull request from that fork to accelerate the fix.
Yeah, looking at it, these lines (those commented out) do solve the specific problem of the user that submitted the fix but I'm pretty sure it's not really a desirable behaviour for a proxy...
You pretty much irreversibly loose control over your protocol with this "fix". I think it should either be configurable in the proxy or managed on the app side.
We're running an internal build of http-proxy that has the exact same lines commented out :P.
Has there been any update on this issue?
Should be fixed in 6a278b3