File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
apps/generator-cli/src/app Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,22 @@ import {
1111 UIService ,
1212 VersionManagerService ,
1313} from './services' ;
14- import { HttpsProxyAgent } from 'https- proxy-agent' ;
14+ import { ProxyAgent } from 'proxy-agent' ;
1515
16- const proxyUrl = process . env . HTTP_PROXY || process . env . HTTPS_PROXY ;
16+ const hasHttpProxyEnvs = process . env . HTTP_PROXY || process . env . http_proxy ;
17+ const hasHttpsProxyEnvs = process . env . HTTPS_PROXY || process . env . https_proxy ;
1718const httpModuleConfig : HttpModuleOptions = { } ;
1819
19- if ( proxyUrl ) {
20+ const proxyAgent = new ProxyAgent ( ) ;
21+
22+ if ( hasHttpProxyEnvs ) {
23+ httpModuleConfig . proxy = false ;
24+ httpModuleConfig . httpAgent = proxyAgent ;
25+ }
26+
27+ if ( hasHttpsProxyEnvs ) {
2028 httpModuleConfig . proxy = false ;
21- httpModuleConfig . httpsAgent = new HttpsProxyAgent ( proxyUrl ) ;
29+ httpModuleConfig . httpsAgent = proxyAgent ;
2230}
2331
2432@Module ( {
You can’t perform that action at this time.
0 commit comments