Add allowAcl and cors options to the storage construct#443
Merged
Conversation
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)
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: truesets OwnershipControls to BucketOwnerPreferred and grants s3:GetObjectAcl/s3:PutObjectAcl to Lambda functionscors: "<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