@@ -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
@@ -55,11 +57,14 @@ export class RemoteAuthorityResolverService extends Disposable implements IRemot
55
57
56
58
private _doResolveAuthority ( authority : string ) : ResolverResult {
57
59
const connectionToken = this . _connectionTokens . get ( authority ) || this . _connectionToken ;
60
+ // NOTE@coder : Add the proxy URI to the environment for use in the remote.
61
+ const options = getOptions < Options > ( ) ;
62
+ const extensionHostEnv = { VSCODE_PROXY_URI : `${ window . location . origin } ${ options . base } /proxy/{port}` } ;
58
63
if ( authority . indexOf ( ':' ) >= 0 ) {
59
64
const pieces = authority . split ( ':' ) ;
60
- return { authority : { authority, host : pieces [ 0 ] , port : parseInt ( pieces [ 1 ] , 10 ) , connectionToken } } ;
65
+ return { authority : { authority, host : pieces [ 0 ] , port : parseInt ( pieces [ 1 ] , 10 ) , connectionToken } , options : { extensionHostEnv } } ;
61
66
}
62
- return { authority : { authority, host : authority , port : 80 , connectionToken } } ;
67
+ return { authority : { authority, host : authority , port : 80 , connectionToken } , options : { extensionHostEnv } } ;
63
68
}
64
69
65
70
_clearResolvedAuthority ( authority : string ) : void {
0 commit comments