Skip to content

Commit a5604b0

Browse files
committed
debug log
1 parent 9193e69 commit a5604b0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/core/src/shared/request.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
import crossFetch from 'cross-fetch'
7+
import { getLogger } from './logger'
78
const { HttpsProxyAgent } = require('https-proxy-agent')
89

910
const 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

0 commit comments

Comments
 (0)