s3ForcePathStyle (#7122)

Co-authored-by: ybw2016v <dogcraft@126.com>
This commit is contained in:
MeiMei 2021-02-06 11:48:57 +09:00 committed by GitHub
parent 0e45f10d99
commit c88902e640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 2 deletions

View file

@ -438,7 +438,11 @@ export const meta = {
objectStorageSetPublicRead: {
validator: $.optional.bool
}
},
objectStorageS3ForcePathStyle: {
validator: $.optional.bool
},
}
};
@ -713,6 +717,10 @@ export default define(meta, async (ps, me) => {
set.objectStorageSetPublicRead = ps.objectStorageSetPublicRead;
}
if (ps.objectStorageS3ForcePathStyle !== undefined) {
set.objectStorageS3ForcePathStyle = ps.objectStorageS3ForcePathStyle;
}
await getConnection().transaction(async transactionalEntityManager => {
const meta = await transactionalEntityManager.findOne(Meta, {
order: {

View file

@ -205,6 +205,7 @@ export default define(meta, async (ps, me) => {
response.objectStorageUseSSL = instance.objectStorageUseSSL;
response.objectStorageUseProxy = instance.objectStorageUseProxy;
response.objectStorageSetPublicRead = instance.objectStorageSetPublicRead;
response.objectStorageS3ForcePathStyle = instance.objectStorageS3ForcePathStyle;
}
}