Skip to content

Commit

Permalink
Add force path style for s3 endpoint override
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoet-jh committed Mar 29, 2024
1 parent 0ac7858 commit 307943e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public S3Client s3Client(StorageProperties storageProperties) throws IOException

String endpoint = storageProperties.getS3Endpoint().orElse(null);
S3Client s3Client = StringUtils.isNotBlank(endpoint)
? builder.endpointOverride(URI.create(endpoint)).build()
? builder.endpointOverride(URI.create(endpoint)).forcePathStyle(true).build()
: builder.build();

if (s3Client.listBuckets().buckets().stream().noneMatch(b -> b.name().equals(bucketName))) {
Expand Down

0 comments on commit 307943e

Please sign in to comment.