Merge branch '858695266_dev' of 858695266/pigx into leng_dev

This commit is contained in:
冷冷 authored and Gogs committed 2020-05-25 11:26:02 +08:00
commit c9c3f6a383
2 files changed
+11 -1

No files matched your search

@@ -29,6 +29,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* oss:
* enable: true
* endpoint: http://127.0.0.1:9000
* # pathStyleAccess 采用nginx反向代理或者AWS S3 配置成true,支持第三方云存储配置成false
* pathStyleAccess: false
* access-key: lengleng
* secret-key: lengleng
* bucket-name: lengleng
@@ -50,6 +52,14 @@ public class OssProperties {
*/
private String customDomain;
/**
* true path-style
* nginx 反向代理和S3默认支持 pathStyle {http://endpoint/bucketname}
* false supports virtual-hosted-style 阿里云等需要配置为
* virtual-hosted-style 模式{http://bucketname.endpoint}
*/
private Boolean pathStyleAccess;
/**
* 应用ID
*/
@@ -212,7 +212,7 @@ public class OssTemplate implements InitializingBean {
.withClientConfiguration(clientConfiguration)
.withCredentials(awsCredentialsProvider)
.disableChunkedEncoding()
.withPathStyleAccessEnabled(false)
.withPathStyleAccessEnabled(ossProperties.getPathStyleAccess())
.build();
}
}