openapi-generator-cli
openapi-generator-cli copied to clipboard
Use agent for proxy configuration
Motivation
HTTPS for corporate proxies doesn't work after https://github.com/OpenAPITools/openapi-generator-cli/pull/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 https://github.com/axios/axios/issues/2072#issuecomment-567473812.
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