rhtyd closed pull request #2562: consoleproxy: use consoleproxy.domain for non-ssl enable env URL: https://github.com/apache/cloudstack/pull/2562
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/com/cloud/info/ConsoleProxyInfo.java b/core/src/com/cloud/info/ConsoleProxyInfo.java index b15abcb54ff..16993d71bdc 100644 --- a/core/src/com/cloud/info/ConsoleProxyInfo.java +++ b/core/src/com/cloud/info/ConsoleProxyInfo.java @@ -19,6 +19,8 @@ package com.cloud.info; +import org.apache.commons.lang3.StringUtils; + public class ConsoleProxyInfo { private boolean sslEnabled; @@ -55,6 +57,9 @@ public ConsoleProxyInfo(boolean sslEnabled, String proxyIpAddress, int port, int proxyImageUrl += ":" + this.proxyUrlPort; } else { proxyAddress = proxyIpAddress; + if (StringUtils.isNotBlank(consoleProxyUrlDomain)) { + proxyAddress = consoleProxyUrlDomain; + } proxyPort = port; this.proxyUrlPort = proxyUrlPort; diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java index f131714ecaf..e6c0a8da6ec 100644 --- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java +++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java @@ -231,7 +231,7 @@ private String _instance; private int _proxySessionTimeoutValue = DEFAULT_PROXY_SESSION_TIMEOUT; - private boolean _sslEnabled = true; + private boolean _sslEnabled = false; private String _consoleProxyUrlDomain; // global load picture at zone basis @@ -1246,8 +1246,7 @@ public boolean configure(String name, Map<String, Object> params) throws Configu Map<String, String> configs = _configDao.getConfiguration("management-server", params); - String value = configs.get(Config.ConsoleProxyCmdPort.key()); - value = configs.get("consoleproxy.sslEnabled"); + String value = configs.get("consoleproxy.sslEnabled"); if (value != null && value.equalsIgnoreCase("true")) { _sslEnabled = true; } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services