File tree Expand file tree Collapse file tree 2 files changed +9
-19
lines changed
Expand file tree Collapse file tree 2 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,12 @@ export async function launchHeadlessBrowser() {
107107
108108 proxyCredentials = extractProxyCredentials ( httpProxy , httpsProxy ) ;
109109
110- options . args = [ ] . concat ( options . args , `--proxy-server=http=${ httpProxyUrl . host } ;https=${ httpsProxyUrl . host } ` ) ;
110+ options . args . push ( `--proxy-server=http=${ httpProxyUrl . host } ;https=${ httpsProxyUrl . host } ` ) ;
111111 }
112112
113113 if ( process . env . FETCHER_NO_SANDBOX ) {
114- options . args = [ ] . concat ( options . args , [ '--no-sandbox' , '--disable-setuid-sandbox' ] ) ;
114+ options . args . push ( '--no-sandbox' ) ;
115+ options . args . push ( '--disable-setuid-sandbox' ) ;
115116 }
116117
117118 browser = await puppeteer . launch ( options ) ;
Original file line number Diff line number Diff line change 11export function resolveProxyConfiguration ( ) {
2- let httpProxy = null ;
3- let httpsProxy = null ;
2+ const httpProxy = process . env . http_proxy || process . env . HTTP_PROXY ;
3+ const httpsProxy = process . env . https_proxy || process . env . HTTPS_PROXY || httpProxy ;
44
5- if ( process . env . http_proxy ) {
6- httpProxy = process . env . http_proxy ;
7- } else if ( process . env . HTTP_PROXY ) {
8- httpProxy = process . env . HTTP_PROXY ;
9- }
10-
11- if ( process . env . https_proxy ) {
12- httpsProxy = process . env . https_proxy ;
13- } else if ( process . env . HTTPS_PROXY ) {
14- httpsProxy = process . env . HTTPS_PROXY ;
15- } else if ( httpProxy ) {
16- httpsProxy = httpProxy ;
17- }
18-
19- return { httpProxy, httpsProxy } ;
5+ return {
6+ httpProxy,
7+ httpsProxy
8+ } ;
209}
2110
2211export function extractProxyCredentials ( httpProxy , httpsProxy ) {
You can’t perform that action at this time.
0 commit comments