You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make webviews load locally
Instead of using Microsoft's hosted endpoint. This also fixes issues
when using code-server over http since some browsers refuse to load http
content (like when using localhost) in https contexts (since the iframe
was always https).
* Revert path checks in web server
We cannot use `includes` because this causes problems with endpoints
that may share portions of their paths.
For example /webview/uuid/service-worker.js was colliding with the
/service-worker.js but moving it before caused static assets that load
from a directory called /webview to start failing. We could move static
up as well but this may just cause other conflicts.
The standard ways of handling base paths seem to be to either ask the
user for the base path or require that a rewriting proxy be put in front
of the application (which rewrites /base/path/my/path to /my/path before
it ever gets to the application). code-server currently requires the
latter and does not support the former but either way the code will look
similar (in the former case we would just strip the base path first,
maybe before calling `handle`).
For reference, the proxy in the Coder product is a rewriting proxy.
This also fixes issues when the web server is behind multiple Express
endpoints. With the existing code /anything/works/ rather than just the
endpoints you specify (/vscode and / in our case) which is unexpected.
It also makes it possible to browse without a trailing slash, for
example /vscode, although that is currently broken for other reasons.
0 commit comments