Enabling CORS (Cross-Origin Resource Sharing)
In this document you can find all the info you need to understand what CORS is, and how it affects the usage of Yarkon with your S3 buckets.
What is CORS?
Cross-origin resource sharing (CORS) defines a way for client web applications that are loaded in one domain to interact with resources in a different domain.
It is important to understand that the ACLs and policies continue to apply when you enable CORS on the bucket. Changing the CORS rules for a bucket does not have any impact on its ACL and policies.
Enabling CORS Automatically
If you are using Yarkon Cloud or Yarkon Server, the recommended way to get all your CORS settings updated in bulk, is using the Yarkon Admin Console. See the section Analyzing and Updating CORS in the document Bucket Management for the full details. It is highly recommended you use the Yarkon Admin Console to handle the changes for you, reducing time spent and human errors.
You only need to update the CORS rules for bucket you expect end users to be using with Yarkon.
Enabling CORS Manually
If you prefer to update the CORS rules for your S3 buckets manually using the Amazon Console, go to the S3 service, and for each bucket you need accessed by end users, click on the Bucket, then go to the “Permissions” tab and use the “CORS Configuration” button to edit the CORS rules for that bucket.
Note that the changes do take a little bit of processing by Amazon, and it is also possible that due to browser caching, it might take a few minutes before you can access the newly updated bucket.
To enable access from all origins, use the * (the star character), like so:
Enabling for all origins is useful if you run different editions of Yarkon at the same time, or you plan to change the edition you use in the future.
The following is the proper CORS rule to be used to enable access by Yarkon Cloud:
The following is the proper CORS rule to be used to enable access by Yarkon Server. Just replace the origin url with the proper DNS name you assigned Yarkon in your organization.