@@ -8,6 +8,8 @@ import { RemoteAuthorities } from 'vs/base/common/network';
88import { URI } from 'vs/base/common/uri' ;
99import { Emitter } from 'vs/base/common/event' ;
1010import { Disposable } from 'vs/base/common/lifecycle' ;
11+ import { Options } from 'vs/ipc' ;
12+ import { getOptions } from 'vs/server/common/util' ;
1113
1214export class RemoteAuthorityResolverService extends Disposable implements IRemoteAuthorityResolverService {
1315
@@ -59,11 +61,14 @@ export class RemoteAuthorityResolverService extends Disposable implements IRemot
5961
6062 private _doResolveAuthority ( authority : string ) : ResolverResult {
6163 const connectionToken = this . _connectionTokens . get ( authority ) || this . _connectionToken ;
64+ // NOTE@coder : Add the proxy URI to the environment for use in the remote.
65+ const options = getOptions < Options > ( ) ;
66+ const extensionHostEnv = { VSCODE_PROXY_URI : `${ window . location . origin } ${ options . base } /proxy/{port}` } ;
6267 if ( authority . indexOf ( ':' ) >= 0 ) {
6368 const pieces = authority . split ( ':' ) ;
64- return { authority : { authority, host : pieces [ 0 ] , port : parseInt ( pieces [ 1 ] , 10 ) , connectionToken } } ;
69+ return { authority : { authority, host : pieces [ 0 ] , port : parseInt ( pieces [ 1 ] , 10 ) , connectionToken } , options : { extensionHostEnv } } ;
6570 }
66- return { authority : { authority, host : authority , port : 80 , connectionToken } } ;
71+ return { authority : { authority, host : authority , port : 80 , connectionToken } , options : { extensionHostEnv } } ;
6772 }
6873
6974 _clearResolvedAuthority ( authority : string ) : void {
0 commit comments