Open
Description
Expected Behaviour
The discover
command uses the proxy set via the environment variables HTTP_PROXY
and/or HTTPS_PROXY
.
Actual Behaviour
The discover
command does not use the proxy set via the environment variables HTTP_PROXY
and/or HTTPS_PROXY
.
Reproduce Scenario (including but not limited to)
- Run a proxy locally, use the proxy code at mitmproxy.org.
- For your App Builder project, set the env vars
HTTP_PROXY
andHTTPS_PROXY
tohttp://127.0.0.1:8080
andhttps://127.0.0.1:8080
respectively - Verify that the proxy settings are set via running
aio info
- Run
aio discover
- it should hit the proxy, but it does not (see logs in the Terminal)
Investigation
We use node-fetch directly, without setting any proxy server configuration via the environment variables.
Proposed Fix
Use the proxied fetch implementation in @adobe/aio-lib-core-networking instead of node-fetch.
Workaround
There is no true workaround since node.js does not use system proxy settings (so you can't set it there).
The only way for the command to work is to not use the proxy.