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

@ -13,7 +13,9 @@ export function getS3(meta: Meta) {
secretAccessKey: meta.objectStorageSecretKey!,
region: meta.objectStorageRegion || undefined,
sslEnabled: meta.objectStorageUseSSL,
s3ForcePathStyle: !!meta.objectStorageEndpoint,
s3ForcePathStyle: !meta.objectStorageEndpoint // AWS with endPoint omitted
? false
: meta.objectStorageS3ForcePathStyle,
httpOptions: {
agent: getAgentByUrl(new URL(u), !meta.objectStorageUseProxy)
}