-
Notifications
You must be signed in to change notification settings - Fork 33.8k
fix(webClientServer): use relative path in logoutEndpointUrl #137762
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
Closed
Closed
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
I was getting module issues again. See #4 for details.
Make tweaks for code server integration
This way we can import it instead of the reh agent server which does not include the directory creation logic we need.
When we pass it in we check for cert or link but that means any self-hosted reverse proxies will not work. Pull the information from the headers instead so it works generically. In practice this may not be necessary since we patch connections from the client to use the current URL instead of referencing the remote authority anyway. I also replaced a — because a git hook was complaining about it and preventing me from committing.
Turns out we used to already do this and if you passed the flag you would actually *disable* the global enable setting. This is because we were defaulting to an empty array which means to enable it globally. Fixes coder/code-server#4397 Fixes coder/code-server#4480
- Added product config to client, iframe config.
* Add back support for unencoded folder/workspace query params Fixes coder/code-server#4484. * Standardize on @author for marking our changes
- Moved URI helper.
Sign up for free
to 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.
Description
This patches the
webClientServer
to ensure thelogoutEndpointUrl
is relative to the root.This ensures the correct URL in case code-server is being served behind a
reverse proxy.
An example of this would be using Caddy to server code-server on
localhost:8082/code/
This fix ensures logging out makes a request to localhost:8082/code/logout instead
of localhost:8082/logout
Video
Before
After
Testing Plan
I tested against the root and the reverse-proxy.
cd vscode && git checkout jsjoeio-fix-csp-reverse-proxy
yarn link
cd code-server && yarn link code-oss-dev --modules-folder vendor/modules
Caddyfile
somewhere:caddy run
http://localhost:8082/code/
in the browserThis PR fixes https://github.com/cdr/code-server/issues/4476
(There is a chance this fixes other reverse proxy issues, but I will test after this is merged).