You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We attempted an upgrade from Rails 7.0.8 to 7.1.1 and encountered CORS issues that blocked our CloudFront CDN assets.
Description
On Rails 7.0.8, our CloudFront CDN assets functioned as expected. However, after upgrading to Rails 7.1.1, CORS issues started blocking our assets. Here is the error message from the console:
Access to script at 'https://foobar.cloudfront.net/assets/public-xxxxxx.js'
from origin 'https://www.ourwebsite.com/' has been blocked by CORS policy:
The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.
Troubleshooting Steps
We attempted the following steps to mitigate the issue, but they were unsuccessful:
Summary
We attempted an upgrade from Rails 7.0.8 to 7.1.1 and encountered CORS issues that blocked our CloudFront CDN assets.
Description
On Rails 7.0.8, our CloudFront CDN assets functioned as expected. However, after upgrading to Rails 7.1.1, CORS issues started blocking our assets. Here is the error message from the console:
Troubleshooting Steps
We attempted the following steps to mitigate the issue, but they were unsuccessful:
Configurations
Gemfile.lock:
config/initializers/cors.rb:
config/environments/production.rb:
Follow-Up Questions
The text was updated successfully, but these errors were encountered: