I am running a Rails app I transferred from Heroku. I’m using ActiveStorage and my images are uploaded to and served from AWS S3 via AWS Cloudfront. I’m using the rack-cors gem and an initializer that includes all my origins (the Rails app on fly.io as well as the Cloudfront CDN) – however I am still getting CORS errors from time to time (I think for assets that are not cached yet?)
Strangely I don’t remember running into this issue when the app was on Heroku.
Does anyone have hints pointing me in the right direction here or is willing to troubleshoot with me?