Add all valid hosts to simple browser (#120929)
and pass sourceUri not targetUri
This commit is contained in:
parent
84043ab3b8
commit
2894338f38
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue