File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,17 @@ export class LaunchContext<
111111 * Use `undefined` to unset existing proxy URL.
112112 */
113113 set proxyUrl ( url : string | undefined ) {
114- this . _proxyUrl = url && new URL ( url ) . href ;
114+ if ( ! url ) {
115+ return ;
116+ }
117+
118+ const urlInstance = new URL ( url ) ;
119+ urlInstance . pathname = '/' ;
120+ urlInstance . search = '' ;
121+ urlInstance . hash = '' ;
122+
123+ // https://www.chromium.org/developers/design-documents/network-settings/#command-line-options-for-proxy-settings
124+ this . _proxyUrl = urlInstance . href . slice ( 0 , - 1 ) ;
115125 }
116126
117127 /**
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ const runPluginTest = <
6666 id,
6767 launchOptions,
6868 browserPlugin : plugin ,
69- _proxyUrl : proxyUrl ,
69+ _proxyUrl : proxyUrl . slice ( 0 , - 1 ) ,
7070 one : 1 ,
7171 useIncognitoPages : false ,
7272 } ;
You can’t perform that action at this time.
0 commit comments