@@ -8,6 +8,8 @@ import { RemoteAuthorities } from 'vs/base/common/network';
8
8
import { URI } from 'vs/base/common/uri' ;
9
9
import { Emitter } from 'vs/base/common/event' ;
10
10
import { Disposable } from 'vs/base/common/lifecycle' ;
11
+ import { Options } from 'vs/ipc' ;
12
+ import { getOptions } from 'vs/server/common/util' ;
11
13
12
14
export class RemoteAuthorityResolverService extends Disposable implements IRemoteAuthorityResolverService {
13
15
@@ -59,11 +61,14 @@ export class RemoteAuthorityResolverService extends Disposable implements IRemot
59
61
60
62
private _doResolveAuthority ( authority : string ) : ResolverResult {
61
63
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}` } ;
62
67
if ( authority . indexOf ( ':' ) >= 0 ) {
63
68
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 } } ;
65
70
}
66
- return { authority : { authority, host : authority , port : 80 , connectionToken } } ;
71
+ return { authority : { authority, host : authority , port : 80 , connectionToken } , options : { extensionHostEnv } } ;
67
72
}
68
73
69
74
_clearResolvedAuthority ( authority : string ) : void {
0 commit comments