File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 44 */
55
66import crossFetch from 'cross-fetch'
7+ import { getLogger } from './logger'
78const { HttpsProxyAgent } = require ( 'https-proxy-agent' )
89
910const request = {
@@ -25,14 +26,15 @@ const request = {
2526 wrappedFetch = crossFetch
2627 ) : FetchRequest {
2728 const proxy = process . env . HTTPS_PROXY || process . env . HTTP_PROXY
29+ if ( proxy ) {
30+ getLogger ( ) . info ( `detectied proxy being used via env variable and is attaching ${ proxy } to userAgent` )
31+ }
2832 const updateParams : any = { ...params }
2933 if ( proxy ) {
3034 const proxyAgent = new HttpsProxyAgent ( proxy )
31-
3235 updateParams . agent = proxyAgent
33-
3436 updateParams . headers = {
35- ...( params ?. headers || { } ) ,
37+ ...( params ?. headers || { } ) , // ???? do we need this?
3638 }
3739 }
3840
You can’t perform that action at this time.
0 commit comments