Following is the CORS configuration that goes under Bucket > Permissions
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
Output is as following:
All objects(files) should be private by default unless something is specifically required to have public access, like images or files that are supposed to go in emails, with previews.
If the files are supposed to be linked (and not previewed) then the link should take the user to a URL that would (optionally, internally redirect to a location that) let the user preview or download the said file using signed URL.