akhilputhiry commented on code in PR #12406:
URL: https://github.com/apache/iceberg/pull/12406#discussion_r1984523655
##########
core/src/main/java/org/apache/iceberg/rest/RESTCatalog.java:
##########
@@ -55,7 +56,22 @@ public class RESTCatalog
public RESTCatalog() {
this(
SessionCatalog.SessionContext.createEmpty(),
- config ->
HTTPClient.builder(config).uri(config.get(CatalogProperties.URI)).build());
+ config -> {
+ HTTPClient.Builder builder =
+
HTTPClient.builder(config).uri(config.get(CatalogProperties.URI));
+
+ boolean proxyEnabled =
+ PropertyUtil.propertyAsBoolean(
+ config, CatalogProperties.PROXY_ENABLED,
CatalogProperties.PROXY_ENABLED_DEFAULT);
+
+ if (proxyEnabled) {
+ builder.withProxy(
+ config.get(CatalogProperties.PROXY_HOSTNAME),
+ Integer.parseInt(config.get(CatalogProperties.PROXY_PORT)));
+ }
+
+ return builder.build();
Review Comment:
Also would it be okay to implement multiple proxy support in a different PR ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]