aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 13 forks source link

S3 getObject cors support #662

Open roeycohen opened 1 year ago

roeycohen commented 1 year ago

Describe the feature

getObject parameters would support "Access-Control-Allow-Origin" (cors) header same way other headers are supported using ResponseCacheControl, ResponseContentDisposition, ResponseContentEncoding, ResponseContentLanguage, ResponseContentType, ResponseExpires see: https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-s3-2006-03-01.html#getobject

Use Case

this mostly should be used with createPresignedRequest, avoiding the broader usage of policies.

Proposed Solution

the second argument "parameters" will accept a new option such as ResponseAccessControlAllowOrigin... of course S3 backend should also support this feature :)

Other Information

No response

Acknowledgements

SDK version used

3

Environment details (Version of PHP (php -v)? OS name and version, etc.)

php 7.4

bhoradc commented 3 months ago

V1349634501