File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export class WebviewPortMappingManager implements IDisposable {
2727 private readonly tunnelService : ITunnelService
2828 ) { }
2929
30- public async getRedirect ( resolveAuthority : IAddress , url : string ) : Promise < string | undefined > {
30+ public async getRedirect ( resolveAuthority : IAddress | null | undefined , url : string ) : Promise < string | undefined > {
3131 const uri = URI . parse ( url ) ;
3232 const requestLocalHostInfo = extractLocalHostUriMetaDataForPortMapping ( uri ) ;
3333 if ( ! requestLocalHostInfo ) {
@@ -38,7 +38,7 @@ export class WebviewPortMappingManager implements IDisposable {
3838 if ( mapping . webviewPort === requestLocalHostInfo . port ) {
3939 const extensionLocation = this . _getExtensionLocation ( ) ;
4040 if ( extensionLocation && extensionLocation . scheme === REMOTE_HOST_SCHEME ) {
41- const tunnel = await this . getOrCreateTunnel ( resolveAuthority , mapping . extensionHostPort ) ;
41+ const tunnel = resolveAuthority && await this . getOrCreateTunnel ( resolveAuthority , mapping . extensionHostPort ) ;
4242 if ( tunnel ) {
4343 if ( tunnel . tunnelLocalPort === mapping . webviewPort ) {
4444 return undefined ;
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ export class WebviewPortMappingProvider extends Disposable {
3636
3737 sess . webRequest . onBeforeRequest ( {
3838 urls : [
39- '*://localhost:*/' ,
40- '*://127.0.0.1:*/' ,
41- '*://0.0.0.0:*/' ,
39+ '*://localhost:*/* ' ,
40+ '*://127.0.0.1:*/* ' ,
41+ '*://0.0.0.0:*/* ' ,
4242 ]
4343 } , async ( details , callback ) => {
4444 const webviewId = details . webContentsId && this . _webContentsIdsToWebviewIds . get ( details . webContentsId ) ;
@@ -47,7 +47,7 @@ export class WebviewPortMappingProvider extends Disposable {
4747 }
4848
4949 const entry = this . _webviewData . get ( webviewId ) ;
50- if ( ! entry || ! entry . metadata . resolvedAuthority ) {
50+ if ( ! entry ) {
5151 return callback ( { } ) ;
5252 }
5353
You can’t perform that action at this time.
0 commit comments