fix(S3): only set Endpoint if not null

This commit is contained in:
Manuel Jenny 2021-04-23 10:43:46 +02:00
parent c99ff2f190
commit 47b31fcd7d
No known key found for this signature in database
GPG Key ID: 1C80FE62B2BEAA18

View File

@ -30,7 +30,9 @@ class S3ClientFactory {
}
AmazonS3Client client = new AmazonS3Client(new BasicAWSCredentials(decrypt(cloud.accessKey(), context), decrypt(cloud.secretKey(), context)), region);
client.setEndpoint(cloud.s3Endpoint());
if (cloud.s3Endpoint() != null) {
client.setEndpoint(cloud.s3Endpoint());
}
return client;
}