base url support
I wanne run behind proxy
This block is working correctly for when a baseurl is provided (via the currentUrl variable). Examples I tested with were https://example.com/code/ and https://example.com/my/long/baseurl/.
By working, I mean that
https://example.com/code/ => https://example.com/code/login
https://example.com/code/login => https://example.com/code/
https://example.com/my/long/baseurl/ => https://example.com/my/long/baseurl/login
https://example.com/my/long/baseurl/login => https://example.com/my/long/baseurl/
https://github.com/codercom/code-server/blob/c3a38e3fea8a28afa4017cf6c45ba12e82ff1feb/packages/server/src/server.ts#L193-L211
I have succeeded to run code-server in a subpath behind nginx using a rewrite. It mostly seems to work, even without anything "baseurl" related. ´´´ location /vscode { rewrite /vscode/(.*) /$1 break; proxy_pass http://vscode:8443; proxy_redirect off; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; }
´´´
Has the team considered implementing this feature?
Today is the first day I tried this damn cool project. 🎉 But when I deployed it to my HTTP server, I ran into the same problem. And the #307 doesn't seem to solve the problem of the HTTP request's paths. Now my HTTP server will still receive requests for files such as *.css and *.js under the root path instead of under the /vscode.
CC @coadler and @Multishifties, looks like this issue is persistent, and we have multiple significant use cases. Recommending escalation.
I'll tag Kyle for this one since this feature has been requested a lot.
@kylecarbs