GoogleChrome / lighthouse-ci

Automate running Lighthouse for every commit, viewing the changes, and preventing regressions
Apache License 2.0
6.41k stars 644 forks source link

HTTP_PROXY and HTTPS_PROXY not being respected by isomorphic-fetch [PSI Strategy] #748

Open abhisheksoni27 opened 2 years ago

abhisheksoni27 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

I am using lhci server behind a webproxy (corporate) and am unable to use the PSI strategy. The request keeps timing out. I suppose it is happening because:

https://github.com/GoogleChrome/lighthouse-ci/blob/2ca0b86a3cb57331d322839e8488b7c61227e4ad/packages/utils/src/psi-client.js#L42

Here's another issue (https://github.com/matthew-andrews/isomorphic-fetch/issues/171) that outlines that isomorphic-fetch does have this problem and it doesn't automatically read HTTP_PROXY and HTTPS_PROXY variables from env.

In that issue, this is also referenced: https://github.com/outline/outline/issues/1893

In this issue, they fixed it here by removing isomorphic-fetch and adding https://github.com/outline/outline/pull/2044/files.

Can we do this here as well?

Environment (please complete the following information):

abhisheksoni27 commented 2 years ago

Here's the fix: https://github.com/GoogleChrome/lighthouse-ci/pull/749