Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/259749

Change subject: Revert "Remove the global proxy setting"
......................................................................

Revert "Remove the global proxy setting"

This reverts commit 6707b8bf424e8ce14f7f2dbd6ccb606c6fc26c50.

Change-Id: If142145864483020b73343473d91662444f5a8fb
---
M app.js
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/49/259749/1

diff --git a/app.js b/app.js
index 878a192..ebf1070 100644
--- a/app.js
+++ b/app.js
@@ -42,6 +42,20 @@
                        'default-src \'self\'; object-src \'none\'; media-src 
*; img-src *; style-src *; frame-ancestors \'self\'';
        }
 
+       // set outgoing proxy
+       if ( app.conf.proxy ) {
+               process.env.HTTP_PROXY = app.conf.proxy;
+               // if there is a list of domains which should
+               // not be proxied, set it
+               if ( app.conf.no_proxy_list ) {
+                       if ( Array.isArray( app.conf.no_proxy_list ) ) {
+                               process.env.NO_PROXY = 
app.conf.no_proxy_list.join( ',' );
+                       } else {
+                               process.env.NO_PROXY = app.conf.no_proxy_list;
+                       }
+               }
+       }
+
        // set up the spec
        if ( !app.conf.spec ) {
                app.conf.spec = __dirname + '/spec.yaml';

-- 
To view, visit https://gerrit.wikimedia.org/r/259749
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If142145864483020b73343473d91662444f5a8fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to