Skip to content

Commit

Permalink
Merge pull request #20 from Sybit-Education/develop
Browse files Browse the repository at this point in the history
configured Proxy settings proxy can now be set on localhost
  • Loading branch information
stritti authored May 19, 2017
2 parents c174a85 + 612de09 commit 3659120
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/com/sybit/airtable/Airtable.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,7 @@ private void configureProxy(String endpointUrl) {
if (this.config.getProxy() == null) {
final String httpProxy = System.getenv("http_proxy");
final String httpsProxy = System.getenv("https_proxy");
if (httpProxy != null
&& (endpointUrl.contains("127.0.0.1")
|| endpointUrl.contains("localhost"))) {
LOG.info("Use Proxy: ignored for 'localhost' ann '127.0.0.1'");
setProxy(null);
} else if (httpsProxy != null
if (httpsProxy != null
&& (endpointUrl.contains("https"))) {
LOG.info("Use Proxy: Environment variable 'https_proxy' found and used: " + httpsProxy);
setProxy(httpProxy);
Expand All @@ -220,8 +215,10 @@ private void configureProxy(String endpointUrl) {
}
} else if ((endpointUrl.contains("127.0.0.1")
|| endpointUrl.contains("localhost"))) {
LOG.info("Use Proxy: ignored for 'localhost' ann '127.0.0.1'");
LOG.info("Use Proxy: ignored for 'localhost' and '127.0.0.1'");
setProxy(null);
} else {
setProxy(this.config.getProxy());
}
}

Expand Down

0 comments on commit 3659120

Please sign in to comment.