mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Add all valid hosts to simple browser (#120929)
and pass sourceUri not targetUri
This commit is contained in:
@@ -16,7 +16,16 @@ const showCommand = 'simpleBrowser.show';
|
||||
|
||||
const enabledHosts = new Set<string>([
|
||||
'localhost',
|
||||
'127.0.0.1'
|
||||
// localhost IPv4
|
||||
'127.0.0.1',
|
||||
// localhost IPv6
|
||||
'0:0:0:0:0:0:0:1',
|
||||
'::1',
|
||||
// all interfaces IPv4
|
||||
'0.0.0.0',
|
||||
// all interfaces IPv6
|
||||
'0:0:0:0:0:0:0:0',
|
||||
'::'
|
||||
]);
|
||||
|
||||
const openerId = 'simpleBrowser.open';
|
||||
|
||||
@@ -108,7 +108,7 @@ export class ExternalUriOpenerService extends Disposable implements IExternalUri
|
||||
await Promise.all(Array.from(allOpeners.values()).map(async opener => {
|
||||
let priority: modes.ExternalUriOpenerPriority;
|
||||
try {
|
||||
priority = await opener.canOpen(targetUri, token);
|
||||
priority = await opener.canOpen(ctx.sourceUri, token);
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user