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: strip port off the hostname. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mfalesni
Copy link

@mfalesni mfalesni commented Oct 9, 2023

The proxy tries to append the https port number directly on the hostname, which contains the http port number. This fix strips the port from the hostname.

@yeokm1
Copy link
Owner

yeokm1 commented Oct 10, 2023

Thanks for your contribution. I'm currently very busy at the moment. I will get back to this fix once I'm available.

@jacklul
Copy link

jacklul commented Nov 6, 2023

What if the destination actually requires that custom port ?

Assuming we are using this proxy because we know what we are doing it might be actually better to leave the port intact in such cases (except when for whatever reason :80 is in the host) and initiate TLS on that port.

For example app receives an URL that is only accessible through HTTPS on custom port but it can't handle it so it forwards this request to this proxy which uses the same port number to grab data through HTTPS.

Optionally, this behavior could be made to switch on whenever we request URL with http or https in the URL.

This is something I'm working on in my fork, plus few additions for personal use case, you can see the changes in my feature branches, if you like any of those branches then I'll be happy to PR them.

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.

3 participants