Add port to redirect URL when server port is 80#741
Closed
deansheather wants to merge 2 commits into
Closed
Conversation
This fixes HTTP to HTTPS redirects when people are running code-server on port 80 (default HTTP port).
Member
|
I think what we might want to do here is if the port is 80, also listen to 443. |
Member
|
Or allow the user to specify multiple ports and just have an expectation that the user will add all the necessary ports for their setup. |
Member
Author
|
I think the second choice is a better solution. We could also add a warning during startup that says "you might want to add port 443 to your server ports" if port 80 is supplied but not 443 and |
Member
|
Yeah, that sounds great to me. |
Member
Author
|
Closed in favor of #819 which allows for listening on multiple ports. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe in detail the problem you had and how this PR fixes it
This fixes HTTP to HTTPS redirects when people are running code-server on port 80 (default HTTP port).
Essentially, if code-server's port is 80 and is accessed over HTTP, code-server would redirect to HTTPS without adding
:80to the end of the URL, resulting in the browser accessing over port 443.I'm hesitant about this PR as it could cause problems with reverse proxies but unable to try multiple reverse proxy scenarios. I don't think this should be merged until reverse proxies are tested and everything works as expected.
Is there an open issue you can link to?
#737
I've made another PR for changing the documentation that lead the user in the above issue to using port 80: #740