Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A27618323 for ; Mon, 7 Dec 2015 17:07:48 +0000 (UTC) Received: (qmail 64934 invoked by uid 500); 7 Dec 2015 17:07:14 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 64905 invoked by uid 500); 7 Dec 2015 17:07:14 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 64896 invoked by uid 99); 7 Dec 2015 17:07:14 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Dec 2015 17:07:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B24E4180A96 for ; Mon, 7 Dec 2015 17:07:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.227 X-Spam-Level: * X-Spam-Status: No, score=1.227 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id OmsFjNghvLta for ; Mon, 7 Dec 2015 17:07:08 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 9D6B644526 for ; Mon, 7 Dec 2015 17:07:00 +0000 (UTC) Received: (qmail 60959 invoked by uid 99); 7 Dec 2015 17:05:45 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Dec 2015 17:05:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C7041E09B2; Mon, 7 Dec 2015 17:05:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jensdeppe@apache.org To: commits@geode.incubator.apache.org Date: Mon, 07 Dec 2015 17:06:07 -0000 Message-Id: <303bc5a15cf3460f9553dea2414f96f7@git.apache.org> In-Reply-To: <6eab8170c971407ea4704217184c5d00@git.apache.org> References: <6eab8170c971407ea4704217184c5d00@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [25/50] [abbrv] incubator-geode git commit: GEODE-605: Fix https access for REST Swagger UI 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/feature/GEODE-17 Commit: 1b0905c9d9a38662d1aafc58749ae882ddc68edd Parents: 6612b9f Author: Jens Deppe Authored: Wed Nov 25 09:43:31 2015 -0800 Committer: Jens Deppe 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