Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the discover command does not use the proxy set via the env vars HTTP_PROXY, HTTPS_PROXY #637

Open
shazron opened this issue Aug 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@shazron
Copy link
Member

shazron commented Aug 23, 2024

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)

  1. Run a proxy locally, use the proxy code at mitmproxy.org.
  2. For your App Builder project, set the env vars HTTP_PROXY and HTTPS_PROXY to http://127.0.0.1:8080 and https://127.0.0.1:8080 respectively
  3. Verify that the proxy settings are set via running aio info
  4. 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.

@shazron shazron added the bug Something isn't working label Aug 23, 2024
@aiojbot
Copy link

aiojbot commented Aug 23, 2024

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-3142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants