- Notifications
You must be signed in to change notification settings - Fork920
fix: delegate path based forwarding to code-server#11759
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
Do not attempt to construct a path based port forward url.Always defer to code server, as it has it's own proxy method.
code-asher approved these changesJan 22, 2024
deansheather approved these changesJan 23, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
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.
Uh oh!
There was an error while loading.Please reload this page.
Do not attempt to construct a path based port forward url. Always defer to code server, as it has it's own proxy method.
Closes#11754
What this does
I am not sure how this ever worked. We used to always set the
VSCODE_PROXY_URI
no matter what to some url (access url or subdomain based). In the access url case, we never appended any path.In practice, code-server can forward ports itself with
/@admin/adminlocal.main/apps/code-server/proxy/8000/
.In the path based proxy case, we should default to not setting an env var. Code server handles this case appropriately:
https://github.com/coder/code-server/blob/d6ef385de271ca53520cdd459bfcc91e9ee4dd02/patches/proxy-uri.diff#L78
If the env var is unset, it will use
/proxy/{{port}}
, which is exactly what we want. If subdomains are available, the env var is set and are used instead.