File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
slack-api-client/src/main/java/com/slack/api Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ public SlackConfig() {
172172 private String proxyUrl = initProxyUrl ();
173173
174174 // This method runs only once when instantiating this object.
175- // If you want to reflect dynamically updated system properties,
175+ // If you want to reflect dynamically updated system properties or env variables ,
176176 // create a new instance by invoking the default constructor.
177177 private static String initProxyUrl () {
178178 String host = System .getProperty ("http.proxyHost" );
@@ -194,6 +194,14 @@ private static String initProxyUrl() {
194194 return "http://" + host ;
195195 }
196196 }
197+ String httpsEnvProxyUrl = System .getenv ("HTTPS_PROXY" );
198+ if (httpsEnvProxyUrl != null && !httpsEnvProxyUrl .trim ().isEmpty ()) {
199+ return httpsEnvProxyUrl ;
200+ }
201+ String httpEnvProxyUrl = System .getenv ("HTTP_PROXY" );
202+ if (httpEnvProxyUrl != null && !httpEnvProxyUrl .trim ().isEmpty ()) {
203+ return httpEnvProxyUrl ;
204+ }
197205 return null ;
198206 }
199207
You can’t perform that action at this time.
0 commit comments