fix(webClientServer): use relative path in logoutEndpointUrl #19
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
Screen.Recording.2021-11-23.at.4.01.12.PM.mov
After
Screen.Recording.2021-11-23.at.4.03.14.PM.mov
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).