mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
ssvm: use secstorage.ssl.cert.domain as hostname if it does not start with '*' when upload a template or volume from local (#3420)
If secstorage.ssl.cert.domain does not start with '*', we should use it as host name in url when upload template/volume from local Fixes #3305
This commit is contained in:
parent
e76266e39b
commit
2408783355
@ -30,9 +30,11 @@ public class ImageStoreUtil {
|
||||
|
||||
//if ssvm url domain is present, use it to construct hostname in the format 1-2-3-4.domain
|
||||
// if the domain name is not present, ssl validation fails and has to be ignored
|
||||
if(StringUtils.isNotBlank(ssvmUrlDomain)) {
|
||||
if(StringUtils.isNotBlank(ssvmUrlDomain) && ssvmUrlDomain.startsWith("*")) {
|
||||
hostname = ipAddress.replace(".", "-");
|
||||
hostname = hostname + ssvmUrlDomain.substring(1);
|
||||
} else if (StringUtils.isNotBlank(ssvmUrlDomain)) {
|
||||
hostname = ssvmUrlDomain;
|
||||
}
|
||||
|
||||
//only https works with postupload and url format is fixed
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user