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

Use agent for proxy configuration #752

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

taras
Copy link

@taras taras commented Feb 6, 2024

Motivation

HTTPS for corporate proxies doesn't work after #651 because it assumed that @nestjs/axios took care of correctly extracting proxy configuration from the environment variables. In reality, axios proxy setup is broken as mentioned in https://stackoverflow.com/a/53399378 and axios/axios#2072 (comment).

The recommended workaround is to disable axios' proxy functionality and use a proxy agent.

Approach

Use proxy-agent to create an agent that automatically uses an appropriate proxy based on environment variables. Configure the HttpModule to use the agent.

TODO

  • Install the dependency
  • Test it to verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant