阿里云 OSS 解析 region 时兼容带 https 的配置

pull/13/MERGE
YunaiV 2022-11-12 10:26:15 +08:00
parent 95d1c82c82
commit 4b92663b5e
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,8 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
// 阿里云必须有 region否则会报错
if (config.getEndpoint().contains(ENDPOINT_ALIYUN)) {
return StrUtil.subBefore(config.getEndpoint(), '.', false)
.replaceAll("-internal", ""); // 去除内网 Endpoint 的后缀
.replaceAll("-internal", "")// 去除内网 Endpoint 的后缀
.replaceAll("https://", "");
}
return null;
}