!207 update 优化 OSS 自定义域名拼接 无需配置HTTP等前缀
Merge pull request !207 from JaneYork/4.X
This commit is contained in:
commit
369e4be31c
@ -119,12 +119,12 @@ public class OssClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
|
String header = OssConstant.IS_HTTPS.equals(properties.getIsHttps()) ? "https://" : "http://";
|
||||||
String domain = properties.getDomain();
|
String domain = properties.getDomain();
|
||||||
if (StringUtils.isNotBlank(domain)) {
|
if (StringUtils.isNotBlank(domain)) {
|
||||||
return domain;
|
return header + domain;
|
||||||
}
|
}
|
||||||
String endpoint = properties.getEndpoint();
|
String endpoint = properties.getEndpoint();
|
||||||
String header = OssConstant.IS_HTTPS.equals(properties.getIsHttps()) ? "https://" : "http://";
|
|
||||||
// 云服务商直接返回
|
// 云服务商直接返回
|
||||||
if (StringUtils.containsAny(endpoint, OssConstant.CLOUD_SERVICE)){
|
if (StringUtils.containsAny(endpoint, OssConstant.CLOUD_SERVICE)){
|
||||||
return header + properties.getBucketName() + "." + endpoint;
|
return header + properties.getBucketName() + "." + endpoint;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user