Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 3659120

Browse files
authored
Merge pull request #20 from Sybit-Education/develop
configured Proxy settings proxy can now be set on localhost
2 parents c174a85 + 612de09 commit 3659120

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/main/java/com/sybit/airtable/Airtable.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,7 @@ private void configureProxy(String endpointUrl) {
202202
if (this.config.getProxy() == null) {
203203
final String httpProxy = System.getenv("http_proxy");
204204
final String httpsProxy = System.getenv("https_proxy");
205-
if (httpProxy != null
206-
&& (endpointUrl.contains("127.0.0.1")
207-
|| endpointUrl.contains("localhost"))) {
208-
LOG.info("Use Proxy: ignored for 'localhost' ann '127.0.0.1'");
209-
setProxy(null);
210-
} else if (httpsProxy != null
205+
if (httpsProxy != null
211206
&& (endpointUrl.contains("https"))) {
212207
LOG.info("Use Proxy: Environment variable 'https_proxy' found and used: " + httpsProxy);
213208
setProxy(httpProxy);
@@ -220,8 +215,10 @@ private void configureProxy(String endpointUrl) {
220215
}
221216
} else if ((endpointUrl.contains("127.0.0.1")
222217
|| endpointUrl.contains("localhost"))) {
223-
LOG.info("Use Proxy: ignored for 'localhost' ann '127.0.0.1'");
218+
LOG.info("Use Proxy: ignored for 'localhost' and '127.0.0.1'");
224219
setProxy(null);
220+
} else {
221+
setProxy(this.config.getProxy());
225222
}
226223
}
227224

0 commit comments

Comments
 (0)