Permalink
Browse files

consoleproxy: use consoleproxy.domain for non-ssl enable env (#2562)

This allows CloudStack to use a console proxy domain instead of public
IP address even when ssl is not enabled but console proxy url/domain
is defined in global settings.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
  • Loading branch information...
rhtyd committed Apr 16, 2018
1 parent 156dbf4 commit 392f62dae0f59b3b00437d61ab8cee0ebfb9e60a
@@ -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;
@@ -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;
}

0 comments on commit 392f62d

Please sign in to comment.