Skip to content
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

Simplified http proxy for cross domain requests. Should help #175 and #7... #103

Merged
merged 1 commit into from Jan 7, 2015

Conversation

killfill
Copy link
Contributor

Hi,

I had some problems with the proxing, and was reading #74 and #175, and decided to send you guys a PR to make the http-proxy a little simplier.

This uses node-http-proxy to handle the proxing and rewrites the location header in case the target sends one.
This way if the 'api backend' responds a redirect, the browser follow it.. :)

Also it does not mess up with the body building, which was the problem in my use-case.

Happy new year!

…#175 and phonegap#74.

Also rewrite the location head in case the target sends one.
@PaulVanSchayck
Copy link

Just applied this patch and it also solves some problems with the proxy for us. Thanks for the work.

mwbrooks added a commit that referenced this pull request Jan 7, 2015
[#175] [#75] Use node-http-proxy to proxy and rewrite headers.
@mwbrooks mwbrooks merged commit 0482e14 into phonegap:master Jan 7, 2015
@mwbrooks
Copy link
Collaborator

mwbrooks commented Jan 7, 2015

@killfill beauty! Thanks for rewriting this implementation. It's done well and a lot cleaner than my approach.

mwbrooks added a commit that referenced this pull request Jan 7, 2015
mwbrooks added a commit that referenced this pull request Jan 7, 2015
@mwbrooks
Copy link
Collaborator

mwbrooks commented Jan 7, 2015

Published as connect-phonegap@0.14.5
Available in phonegap@4.1.2-0.22.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants