Closed Chriscbr closed 2 months ago
Thanks for opening this pull request! :tada: Please consult the contributing guidelines for details on how to contribute to this project. If you need any assistance, don't hesitate to ping the relevant owner over Discord.
Topic | Owner |
---|---|
Wing SDK and standard library | @chriscbr |
Wing Console | @skyrpex |
Wing compiler and language design | @chriscbr |
VSCode extension and language server | @chriscbr |
Wing CLI | @chriscbr |
Documentation | @boyney123 |
Examples | @boyney123 |
Wing Playground | @skyrpex |
Console preview environment is available at https://wing-console-pr-7104.fly.dev :rocket:
Thanks for contributing, @Chriscbr! This PR will now be added to the merge queue, or immediately merged if rybickic/bucket-cors
is up-to-date with main
and the queue is empty.
Congrats! :rocket: This was released in Wing 0.85.0.
Closes #7058 Closes #7048
Currently, signed URLs created with
cloud.Bucket
can't be used by web applications in Wing since CORS options aren't configurable. CORS (Cross-Origin Resource Sharing) affects how the browser can access other domains. To solve this, we add two new fields,cors
andcorsOptions
to the props ofcloud.Bucket
.We've configured
cors: true
as the default so that these kinds of use cases for using signed URLs will work out of the box. If the bucket is private, CORS settings still apply, but they only come into effect when the bucket's objects are accessed through a signed URL or by authenticated users.BREAKING CHANGE:
cloud.Bucket
now is synthesized with CORS configuration by default (currently only supported on AWS). If your bucket is public or you are using signed URLs extensively, you may want to consider configuring thecorsOptions
on the bucket or disabling CORS based on your application's needs.Checklist
pr/e2e-full
label if this feature requires end-to-end testingBy submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.