diff --git a/.env.example b/.env.example index a52f48f2..024104ea 100644 --- a/.env.example +++ b/.env.example @@ -19,6 +19,7 @@ AWS_S3_SECRET_ACCESS_KEY= AWS_S3_REGION= AWS_S3_BUCKET= AWS_S3_ENDPOINT= +AWS_S3_FORCE_PATH_STYLE= # options: smtp | postmark MAIL_DRIVER=smtp diff --git a/apps/server/src/integrations/environment/environment.service.ts b/apps/server/src/integrations/environment/environment.service.ts index 3d3a7dbb..dbc39353 100644 --- a/apps/server/src/integrations/environment/environment.service.ts +++ b/apps/server/src/integrations/environment/environment.service.ts @@ -62,6 +62,10 @@ export class EnvironmentService { getAwsS3Endpoint(): string { return this.configService.get('AWS_S3_ENDPOINT'); } + + getAwsS3ForcePathStyle(): boolean { + return this.configService.get('AWS_S3_FORCE_PATH_STYLE') + } getAwsS3Url(): string { return this.configService.get('AWS_S3_URL'); diff --git a/apps/server/src/integrations/storage/providers/storage.provider.ts b/apps/server/src/integrations/storage/providers/storage.provider.ts index c23d9a4b..791bf694 100644 --- a/apps/server/src/integrations/storage/providers/storage.provider.ts +++ b/apps/server/src/integrations/storage/providers/storage.provider.ts @@ -48,6 +48,7 @@ export const storageDriverConfigProvider = { endpoint: environmentService.getAwsS3Endpoint(), bucket: environmentService.getAwsS3Bucket(), baseUrl: environmentService.getAwsS3Url(), + forcePathStyle: environmentService.getAwsS3ForcePathStyle(), credentials: undefined, }, };