geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject incubator-geode git commit: GEODE-605: Fix https access for REST Swagger UI
Date Wed, 25 Nov 2015 17:48:32 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 6612b9f23 -> 1b0905c9d


GEODE-605: Fix https access for REST Swagger UI


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1b0905c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1b0905c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1b0905c9

Branch: refs/heads/develop
Commit: 1b0905c9d9a38662d1aafc58749ae882ddc68edd
Parents: 6612b9f
Author: Jens Deppe <jdeppe@pivotal.io>
Authored: Wed Nov 25 09:43:31 2015 -0800
Committer: Jens Deppe <jdeppe@pivotal.io>
Committed: Wed Nov 25 09:43:31 2015 -0800

----------------------------------------------------------------------
 .../web/swagger/config/RestApiPathProvider.java        | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b0905c9/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
----------------------------------------------------------------------
diff --git a/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
b/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
index ea40060..a8921d7 100644
--- a/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
+++ b/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
@@ -18,9 +18,8 @@ package com.gemstone.gemfire.rest.internal.web.swagger.config;
 
 import javax.servlet.ServletContext;
 
-import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.mangofactory.swagger.core.SwaggerPathProvider;
 
@@ -42,12 +41,10 @@ public class RestApiPathProvider implements SwaggerPathProvider {
     Assert.isTrue(!StringUtils.isBlank(docsLocation),
         "The docs location must be specified!");
 
-    this.docsLocation = "http://"
-        + InternalDistributedSystem.getAnyInstance().getConfig()
-            .getHttpServiceBindAddress()
-        + ":"
-        + InternalDistributedSystem.getAnyInstance().getConfig()
-            .getHttpServicePort();
+    DistributionConfig config = InternalDistributedSystem.getAnyInstance().getConfig();
+    String scheme = config.getHttpServiceSSLEnabled() ? "https" : "http";
+
+    this.docsLocation = scheme + "://" + config.getHttpServiceBindAddress() + ":" + config.getHttpServicePort();
   }
 
   @Override


Mime
View raw message