Skip to content

Add allowAcl and cors options to the storage construct#443

Merged
mnapoli merged 3 commits intomasterfrom
storage-additions
Apr 9, 2026
Merged

Add allowAcl and cors options to the storage construct#443
mnapoli merged 3 commits intomasterfrom
storage-additions

Conversation

@mnapoli
Copy link
Copy Markdown
Member

@mnapoli mnapoli commented Apr 9, 2026

Laravel/PHP apps using Flysystem need S3 buckets with ACLs enabled (disabled by default since April 2023), and CORS configured for presigned browser uploads. Both previously required verbose CloudFormation via extensions.

  • allowAcl: true sets OwnershipControls to BucketOwnerPreferred and grants s3:GetObjectAcl/s3:PutObjectAcl to Lambda functions
  • cors: "<origin>" configures CORS with default methods (GET/PUT/DELETE)
  • cors: [{allowedOrigins, allowedMethods, ...}] for full CORS rules with camelCase key support (like lifecycleRules)

This is a direct follow-up for brefphp/bref#2094

mnapoli and others added 3 commits April 9, 2026 18:33
Laravel/PHP apps using Flysystem need S3 buckets with ACLs enabled (disabled by default since April 2023), and CORS configured for presigned browser uploads. Both previously required verbose CloudFormation via `extensions`.

- `allowAcl: true` sets OwnershipControls to BucketOwnerPreferred and grants s3:GetObjectAcl/s3:PutObjectAcl to Lambda functions
- `cors: "<origin>"` configures CORS with default methods (GET/PUT/DELETE)
- `cors: [{allowedOrigins, allowedMethods, ...}]` for full CORS rules with camelCase key support (like lifecycleRules)
The CI runner's global TypeScript (6.x) was being used instead of the
project's local 4.9.5, causing TS5101 errors on the deprecated baseUrl
option.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@mnapoli mnapoli merged commit a709298 into master Apr 9, 2026
5 checks passed
@mnapoli mnapoli deleted the storage-additions branch April 9, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant