Closed mrsimpson closed 2 years ago
Do you have any suggestions on how to fix this?
In general: Inject a custom http.Agent
(see the long-lasting node-fetch-issue).
However, you'd want to read the proxy settings from a file in order to create the agent.
There are many (small / not too popular) packages doing this, e. g. https://www.npmjs.com/package/fetch-with-proxy
As you can see, the source of the above package is very compact and does just that: parse the env variables and configure the agent. Probably, ~most~ too many devs just copy-paste instead of adding the dependencies 😬
In a corporate environment, deployment using a proxy is not possible:
The reason is that
node-fetch
does not natively support a proxy.