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

Fix issue where front-end is HTTPS, back-end is HTTP, and server issues a redirect. #165

Merged
merged 2 commits into from
Dec 14, 2011
Merged

Conversation

elfsternberg
Copy link
Contributor

This handles the case where a back-end web application such as Django or
Rails issues a redirect and automatically decorates the URL with the
protocol with which it was addressed. If the back-ends are internal and
HTTP-only, then they'll issue a URL with 'http://' as the protocol.
This must be fixed before leaving the proxy.

This also handles the (unusual) case where a back-end speaks only
https://, but the user is deploying node-http-proxy to make that service
available to non-SSL capable browsers. Works only with 301 and 302
codes.

May fix Issue #37. All I know is it works for my use case.

error-prone in-line method.

_getKey() will look for options.target as well as
options.host:options.port, and so is useful for a segmented
proxy server where the destination proxies are not constructed before
first references.
…es a redirect.

This handles the case where a back-end web application such as Django or
Rails issues a redirect and automatically decorates the URL with the
protocol with which it was addressed.  If the back-ends are internal and
HTTP-only, then they'll issue a URL with 'http://' as the protocol.
This must be fixed before leaving the proxy.

This also handles the (unusual) case where a back-end speaks only
https://, but the user is deploying node-http-proxy to make that service
available to non-SSL capable browsers.  Works only with 301 and 302
codes.
@AvianFlu
Copy link
Contributor

This pull request also contains the commit from your other pull request. Did you want the other one closed, or was it an extraneous commit?

@elfsternberg
Copy link
Contributor Author

I meant to only include the redirect issue. Github, for some reason, thought I was including both. Sorry, I'm a little new to pull requests.

indexzero added a commit that referenced this pull request Dec 14, 2011
Fix issue where front-end is HTTPS, back-end is HTTP, and server issues a redirect.
@indexzero indexzero merged commit 9f05e6c into http-party:master Dec 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants