Skip to content

Commit a2b34ea

Browse files
committed
wip: option 2
1 parent 6c18207 commit a2b34ea

File tree

1 file changed

+4
-1
lines changed
  • lib/vscode/src/vs/workbench/api/common/shared

1 file changed

+4
-1
lines changed

lib/vscode/src/vs/workbench/api/common/shared/webview.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ export function asWebviewUri(
6161
// contained a port like localhost:8080.
6262
// As a temporary workaround, we split the authority at the first colon
6363
// and use the first part e.g. localhost
64+
const [host, port] = resource.authority.split(':', 2)
65+
const authority = `${resource.scheme}+${host}.${webviewRootResourceAuthority}${port ? `:${port}` : ''}`;
66+
console.log(`show me the authority: ${authority}`);
6467
return URI.from({
6568
scheme: Schemas.https,
66-
authority: `${resource.scheme}+${resource.authority.split(':')[0]}.${webviewRootResourceAuthority}`,
69+
authority,
6770
path: resource.path,
6871
fragment: resource.fragment,
6972
query: resource.query,

0 commit comments

Comments
 (0)