login and logout can't redirect to subpath behind reverse proxy
See original GitHub issueOS/Web Information
- Web Browser: Chrome
- Local OS: Win10
- Remote OS: Ubuntu 18
- Remote Architecture: x64
code-server --version
: 4.0.1
Steps to Reproduce
- config Nginx
- proxy xxx.com/vscode to 127.0.0.1:5002
- start code-server on port 5002
Expected
login: xxx.com/vscode -> xxx.com/vscode/login -> xxx.com/vscode logout: xxx.com/vscode/logout -> xxx.com/vscode -> xxx.com/vscode/login
Actual
login: xxx.com/vscode -> xxx.com/login -> xxx.com/vscode logout: xxx.com/logout -> xxx.com -> xxx.com/login
Logs
login: logout:
Screenshot
login:
logout:
Notes
This issue can be reproduced in VS Code: No
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Jenkins reverse proxy failing for log in/out pages - Server Fault
I have setup the reverse proxy on the nginx server and it almost works perfectly. The only issue now is that when I...
Read more >Webpage keeps being redirected to upstream server address ...
My solution was based off this post here: https://unix.stackexchange.com/questions/290141/nginx-reverse-proxy-redirection.
Read more >Using a Reverse Proxy with WP Engine - Support Center
Due to the intentional layer of abstraction, WP Engine Support is unable to assist with configuring or troubleshooting a reverse proxy ...
Read more >Web Application Access | Teleport Docs
A join token is required to authorize a Teleport Application Proxy service ... Log in to your cluster with tsh so you can...
Read more >Changing the reverse proxy URL in the Logout Page ... - IBM
If the Logout Page Configuration details are set up to redirect users to a reverse proxy URL, when particular changes are made to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think
proxy_pass http://127.0.0.1:5002/;
should do it (notice the trailing slash).code-server expects the reverse proxy to rewrite the path and the way you do that in NGINX is by appending a trailing slash to the proxy pass value (in Caddy it is the
uri strip_prefix /vscode
line that does this).This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.