Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/inttest/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ faf-api:
access-key: admin
secret-key: banana123
endpoint: http://minio
region: auto
user-upload-bucket: user-uploads

logging:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ public static class Coturn {
@Data
public static class S3 {
private String endpoint;
private String region;
private String userUploadBucket;
private String accessKey;
private String secretKey;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/faforever/api/config/S3Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public S3Client s3Client() {
public S3Presigner s3Presigner() {
return S3Presigner.builder()
.endpointOverride(URI.create(properties.getS3().getEndpoint()))
.region(Region.EU_CENTRAL_1) // region must be non-null but is ignored by some S3-compatible services
// Cloudflare has different regions as AWS: wnam, enam, weur, eeur, apac, oc, auto
.region(Region.of(properties.getS3().getRegion())) // region must be non-null but is ignored by some S3-compatible services
.credentialsProvider(StaticCredentialsProvider.create(
AwsBasicCredentials.create(properties.getS3().getAccessKey(), properties.getS3().getSecretKey())
))
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ faf-api:
access-key: ${S3_ACCESS_KEY:admin}
secret-key: ${S3_SECRET_KEY:banana123}
user-upload-bucket: ${S3_USER_UPLOADS_BUCKET:user-uploads}
region: ${S3_REGION:auto} # auto is a Cloudflare value

spring:
datasource:
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ faf-api:
access-key: ${S3_ACCESS_KEY:admin}
secret-key: ${S3_SECRET_KEY:banana123}
endpoint: ${S3_ENDPOINT:http://minio}
region: ${S3_REGION:auto} # auto is a Cloudflare value
user-upload-bucket: ${S3_USER_UPLOAD_BUCKET:user-uploads}

spring:
Expand Down
Loading