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

Logout Link is not working when using caddy #3608

Closed
rdesaintleger opened this issue Jun 15, 2021 · 1 comment
Closed

Logout Link is not working when using caddy #3608

rdesaintleger opened this issue Jun 15, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rdesaintleger
Copy link

OS/Web Information

  • Web Browser: Firefox 89.0
  • Local OS: MacOS 11.3
  • Remote OS: Debian GNU/Linux 10 (buster)
  • Remote Architecture: amd64
  • code-server --version: 3.10.2 387b12e

Steps to Reproduce

  1. Perform a default VS Code exposed to the Internet using caddy. with the following caddy directive

your.ssl.domain/code/* {
uri strip_prefix /code
reverse_proxy 127.0.0.1:5080
}

  1. for the user which will run code-server, use the following configuration file

bind-addr: 127.0.0.1:5080
auth: password
password: secret
cert: false

  1. start the vscode service for the user and login
  2. try to logout

Expected

redirection to login page

Actual

code-server reopens

Logs

no logs from code-server. But a problem description

The logout request is done using an HTTP GET /code/logout?base=/code.

The 'base' parameter is sent using the query, however the logout service awaits the base parameter in the request body. The problem can be removed either by checking the base parameter in the query or using HTTP POST parameters when making the logout request.

https://github.com/cdr/code-server/blob/4bb7a8ddb9b75c6f99f44454a0217fbe6942824d/src/node/routes/logout.ts#L11

actually, changing 'body' to 'query' in the file /usr/lib/code-server/out/node/routes/logout.js and restarting code-server fixes the problem

Screenshot

none to be provided

Notes

This issue can be reproduced in VS Code: No

code-asher added a commit to code-asher/code-server that referenced this issue Jun 15, 2021
code-asher added a commit to code-asher/code-server that referenced this issue Jun 15, 2021
@code-asher
Copy link
Member

code-asher commented Jun 15, 2021 via email

@code-asher code-asher added this to the 3.11.0 milestone Jun 15, 2021
@code-asher code-asher added the bug Something isn't working label Jun 15, 2021
@code-asher code-asher self-assigned this Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants