mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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>
This commit is contained in:
parent
156dbf466c
commit
392f62dae0
@ -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 class ConsoleProxyInfo {
|
||||
proxyImageUrl += ":" + this.proxyUrlPort;
|
||||
} else {
|
||||
proxyAddress = proxyIpAddress;
|
||||
if (StringUtils.isNotBlank(consoleProxyUrlDomain)) {
|
||||
proxyAddress = consoleProxyUrlDomain;
|
||||
}
|
||||
proxyPort = port;
|
||||
this.proxyUrlPort = proxyUrlPort;
|
||||
|
||||
|
||||
@ -231,7 +231,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
|
||||
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 class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user