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

Allow passing a -s parameter, use it as the destination URL scheme #2

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

antifuchs
Copy link
Contributor

I needed to proxy to an https service, and couldn't figure out the right way to set up cors-proxy such that it would do this; the r.TLS check seemed wrong (or rather, unachievable since I didn't give the cors-proxy server a certificate or key), so I decided to make cors-proxy effectively unwrap TLS from the requests: A client sends an HTTP request to cors-proxy, and cors-proxy makes an HTTPS request to the destination service.

Additionally, this fixes a typo in parameter validation.

Hope you find this and #1 acceptable - with these two, I could successfully proxy to an HTTPS JSON API in a dev environment! (-:

This makes it possible to proxy to https services (effectively
unwrapping the HTTPS at the cors proxy).
Copy link
Owner

@metal3d metal3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I'm checking and I will merge it as soon as possible.

@metal3d metal3d merged commit 6315db0 into metal3d:master Mar 28, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants