File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/vs/code/browser/workbench Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -440,12 +440,17 @@ class WindowIndicator implements IWindowIndicator {
440440 /**
441441 * If the value begins with a slash assume it is a file path and convert it to
442442 * use the vscode-remote scheme.
443+ *
444+ * We also add the remote authority in toRemote. It needs to be accurate
445+ * otherwise other URIs won't match it, leading to issues such as this one:
446+ * https://github.com/coder/code-server/issues/4630
443447 *
444448 * @author coder
445449 */
450+ const remoteAuthority = location . host
446451 const toRemote = ( value : string ) : string => {
447452 if ( value . startsWith ( '/' ) ) {
448- return 'vscode-remote://' + value ;
453+ return 'vscode-remote://' + remoteAuthority + value ;
449454 }
450455 return value ;
451456 } ;
@@ -564,7 +569,7 @@ class WindowIndicator implements IWindowIndicator {
564569 * determine this reliably on the backend.
565570 * @author coder
566571 */
567- remoteAuthority : location . host ,
572+ remoteAuthority,
568573 /**
569574 * Override relative URLs in the product configuration against the window
570575 * location as necessary. Only paths that must be absolute need to be
You can’t perform that action at this time.
0 commit comments