You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/02 20:15:50 UTC

[GitHub] [pulsar-manager] rdhabalia commented on a diff in pull request #486: Adding https support for backend service

rdhabalia commented on code in PR #486:
URL: https://github.com/apache/pulsar-manager/pull/486#discussion_r961978656


##########
src/main/java/org/apache/pulsar/manager/service/impl/BrokerStatsServiceImpl.java:
##########
@@ -124,13 +129,22 @@ private void scheduleCollectStats() {
             clusterLists.forEach((clusterMap) -> {
                 String cluster = (String) clusterMap.get("cluster");
                 Pair<String, String> envCluster = Pair.of(env.getName(), cluster);
-                String webServiceUrl = (String) clusterMap.get("serviceUrl");
+
+                String webServiceUrl = (String) (tlsEnabled && clusterMap.containsKey("serviceUrlTls") && StringUtils.isNotBlank((String) clusterMap.get("serviceUrlTls")) ?

Review Comment:
   ```
   String serviceUrlTls = clusterMap.get("serviceUrlTls");
   tlsEnabled = tlsEnabled && StringUtils.isNotBlank(serviceUrlTls);
   String webServiceUrl = tlsEnabled ? serviceUrlTls : clusterMap.get("serviceUrl");
   
   at line#140
   if(!url.startsWith("http") {
      url = (tlsEnabled ? "https://" : "http://") + url;
   }
   
   we can remove line#144
   
   ```
   



-- 
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: dev-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org