File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export class Config {
4646 Config . NODE_ENV = Config . getEnv ( "NODE_ENV" , "development" ) ;
4747 Config . HTTP_PROXY = Config . getEnv ( "HTTP_PROXY" , "" ) ;
4848 Config . HTTPS_PROXY = Config . getEnv ( "HTTPS_PROXY" , "" ) ;
49-
49+ Config . NO_PROXY = Config . getEnv ( "NO_PROXY" , "" ) ;
5050
5151 Config . stripe_api_key = Config . getEnv ( "stripe_api_key" , "" ) ;
5252 Config . stripe_api_secret = Config . getEnv ( "stripe_api_secret" , "" ) ;
@@ -206,6 +206,7 @@ export class Config {
206206 public static NODE_ENV : string = Config . getEnv ( "NODE_ENV" , "development" ) ;
207207 public static HTTP_PROXY : string = Config . getEnv ( "HTTP_PROXY" , "" ) ;
208208 public static HTTPS_PROXY : string = Config . getEnv ( "HTTPS_PROXY" , "" ) ;
209+ public static NO_PROXY : string = Config . getEnv ( "NO_PROXY" , "" ) ;
209210
210211 public static stripe_api_key : string = Config . getEnv ( "stripe_api_key" , "" ) ;
211212 public static stripe_api_secret : string = Config . getEnv ( "stripe_api_secret" , "" ) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export class Config {
2525 Config . NODE_ENV = Config . getEnv ( "NODE_ENV" , "development" ) ;
2626 Config . HTTP_PROXY = Config . getEnv ( "HTTP_PROXY" , "" ) ;
2727 Config . HTTPS_PROXY = Config . getEnv ( "HTTPS_PROXY" , "" ) ;
28+ Config . NO_PROXY = Config . getEnv ( "NO_PROXY" , "" ) ;
2829
2930 Config . saml_federation_metadata = Config . getEnv ( "saml_federation_metadata" , "" ) ;
3031 Config . saml_issuer = Config . getEnv ( "saml_issuer" , "" ) ;
@@ -93,6 +94,7 @@ export class Config {
9394 public static NODE_ENV : string = Config . getEnv ( "NODE_ENV" , "development" ) ;
9495 public static HTTP_PROXY : string = Config . getEnv ( "HTTP_PROXY" , "" ) ;
9596 public static HTTPS_PROXY : string = Config . getEnv ( "HTTPS_PROXY" , "" ) ;
97+ public static NO_PROXY : string = Config . getEnv ( "NO_PROXY" , "" ) ;
9698
9799 public static allow_start_from_cache : boolean = Config . parseBoolean ( Config . getEnv ( "allow_start_from_cache" , "false" ) ) ;
98100 public static auto_restart_when_needed : boolean = Config . parseBoolean ( Config . getEnv ( "auto_restart_when_needed" , "true" ) ) ;
Original file line number Diff line number Diff line change @@ -582,8 +582,13 @@ export class noderedcontribopenflowstorage {
582582 // npmrc.content = fs.readFileSync(npmrcFile, "utf8");
583583 // await this._setnpmrc(npmrc);
584584 } else if ( ! NoderedUtil . IsNullEmpty ( Config . HTTP_PROXY ) || ! NoderedUtil . IsNullEmpty ( Config . HTTPS_PROXY ) ) {
585+ // According to https://docs.npmjs.com/cli/v7/using-npm/config it should be picked up by envoriment variables,
586+ // HTTP_PROXY, HTTPS_PROXY and NO_PROXY
585587 const npmrc = new noderednpmrc ( ) ;
586588 npmrc . content = "proxy=" + Config . HTTP_PROXY + "\n" + "https-proxy=" + Config . HTTPS_PROXY ;
589+ if ( ! NoderedUtil . IsNullEmpty ( Config . NO_PROXY ) ) {
590+ npmrc . content += "\n" + "noproxy=" + Config . NO_PROXY ;
591+ }
587592 npmrc . content += "\n" + "registry=http://registry.npmjs.org/" ;
588593 fs . writeFileSync ( npmrcFile , npmrc . content ) ;
589594 } else {
Original file line number Diff line number Diff line change @@ -62,9 +62,10 @@ services:
6262 - protocol=http
6363 - port=3000
6464 - domain=localhost.openiap.io
65- # Fill to set proxy settings inside docker instances, you may also need to add an npmrc entry to the nodered collection !
65+
6666 - HTTP_PROXY=
6767 - HTTPS_PROXY=
68+ - NO_PROXY=
6869
6970 - enable_openflow_amqp=false # enable this to use the openflow amqp, only usefull when you have more than one replicas
7071 - amqp_prefetch=25
You can’t perform that action at this time.
0 commit comments