File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ const RULES = [
190
190
'pathname' ,
191
191
'search' ,
192
192
'username' ,
193
- 'password'
193
+ 'password' ,
194
+ 'origin'
194
195
] ,
195
196
disallowedDefinitions : [
196
197
'lib.dom.d.ts' // no DOM
Original file line number Diff line number Diff line change @@ -206,7 +206,8 @@ const RULES = [
206
206
'pathname' ,
207
207
'search' ,
208
208
'username' ,
209
- 'password'
209
+ 'password' ,
210
+ 'origin'
210
211
] ,
211
212
disallowedDefinitions : [
212
213
'lib.dom.d.ts' // no DOM
Original file line number Diff line number Diff line change @@ -149,7 +149,6 @@ export class RemoteExtensionHostAgentServer extends Disposable implements IServe
149
149
responseHeaders [ 'Vary' ] = 'Origin' ;
150
150
const requestOrigin = req . headers [ 'origin' ] ;
151
151
if ( requestOrigin && this . _webEndpointOriginChecker . matches ( requestOrigin ) ) {
152
- console . log ( `setting Access-Control-Allow-Origin` ) ;
153
152
responseHeaders [ 'Access-Control-Allow-Origin' ] = requestOrigin ;
154
153
}
155
154
@@ -790,13 +789,13 @@ class WebEndpointOriginChecker {
790
789
}
791
790
792
791
const uuid = generateUuid ( ) ;
793
- const exampleUri = URI . parse (
792
+ const exampleUrl = new URL (
794
793
webEndpointUrlTemplate
795
794
. replace ( '{{uuid}}' , uuid )
796
795
. replace ( '{{commit}}' , commit )
797
796
. replace ( '{{quality}}' , quality )
798
797
) ;
799
- const exampleOrigin = ` ${ exampleUri . scheme } :// ${ exampleUri . authority } ` ;
798
+ const exampleOrigin = exampleUrl . origin ;
800
799
const originRegExpSource = (
801
800
escapeRegExpCharacters ( exampleOrigin )
802
801
. replace ( uuid , '[a-zA-Z0-9\-]+' )
You can’t perform that action at this time.
0 commit comments