I have a Rails app that uses ActiveStorage/S3 for managing attachments. Some of these attachments, which need to be downloaded and executed in my client, are .js files.
When I initially tried to download these assets I got an error related to CORS, which I fixed by adding a CORS configuration to my S3 bucket, as per this answer.
The configuration includes the line
<AllowedOrigin>*</AllowedOrigin>
This line makes me somewhat nervous. I want to keep the assets private. They're in a bucket with no public access, and users of my rails app must be authenticated in order to be redirected to them.
I'm unclear on what this line means exactly, in the context of a CORS configuration. Will it compromise the security of my attachments? Would naming a specific origin, rather than allowing all, make my attachments more secure?