@@ -56,20 +56,6 @@ public GlobalProxyConfig getGlobalProxyConfig()
5656 private void setupGlobalProxyConfig ()
5757 {
5858 logger .debug ( "Setup global proxy config, host: {}" , defaultSiteConfig .getProxyHost () );
59- final String allowTypes = defaultSiteConfig .getProxyAllowHttpJobTypes ();
60- final List <String > list = new ArrayList <>();
61- if ( isNotBlank ( allowTypes ) )
62- {
63- String [] toks = allowTypes .split ( "," );
64- for ( String s : toks )
65- {
66- s = s .trim ();
67- if ( isNotBlank ( s ) )
68- {
69- list .add ( s );
70- }
71- }
72- }
7359 globalProxyConfig = new GlobalProxyConfig ()
7460 {
7561 @ Override
@@ -93,16 +79,40 @@ public String getUser()
9379 @ Override
9480 public List <String > getAllowHttpJobTypes ()
9581 {
96- return list ;
82+ return getList ( defaultSiteConfig .getProxyAllowHttpJobTypes () );
83+ }
84+
85+ @ Override
86+ public List <String > getEgressSites ()
87+ {
88+ return getList ( defaultSiteConfig .getEgressSites () );
9789 }
9890
9991 @ Override
10092 public String toString ()
10193 {
10294 return String .format ( "GlobalProxyConfig [host=%s, port=%s, allowHttpJobTypes=%s]" , getHost (),
103- getPort (), allowTypes );
95+ getPort (), defaultSiteConfig . getProxyAllowHttpJobTypes () );
10496 }
10597 };
10698 logger .debug ( "Global proxy config produced: {}" , globalProxyConfig );
10799 }
100+
101+ private List <String > getList ( String value )
102+ {
103+ final List <String > list = new ArrayList <>();
104+ if ( isNotBlank ( value ) )
105+ {
106+ String [] toks = value .split ( "," );
107+ for ( String s : toks )
108+ {
109+ s = s .trim ();
110+ if ( isNotBlank ( s ) )
111+ {
112+ list .add ( s );
113+ }
114+ }
115+ }
116+ return list ;
117+ }
108118}
0 commit comments