nsivarajan commented on code in PR #60921:
URL: https://github.com/apache/doris/pull/60921#discussion_r2882558584
##########
fe/fe-core/src/main/java/org/apache/doris/common/util/HttpURLUtil.java:
##########
@@ -34,9 +35,12 @@ public static HttpURLConnection
getConnectionWithNodeIdent(String request) throw
try {
SecurityChecker.getInstance().startSSRFChecking(request);
URL url = new URL(request);
+
+ if (url.getProtocol().equalsIgnoreCase("https") &&
Config.enable_https) {
+ InternalHttpsUtils.installTrustManagerForUrlConnection();
+ }
+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
- // Must use Env.getServingEnv() instead of getCurrentEnv(),
- // because here we need to obtain selfNode through the official
service catalog.
HostInfo selfNode = Env.getServingEnv().getSelfNode();
conn.setRequestProperty(Env.CLIENT_NODE_HOST_KEY,
selfNode.getHost());
conn.setRequestProperty(Env.CLIENT_NODE_PORT_KEY,
selfNode.getPort() + "");
Review Comment:
Restored comments
--
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]