Recently we moved our assets on a CDN Cloudfront. We have noticed that the surfaces were broken on Firefox. After a few minutes of searching, it was a story of CORS. We allowed the field Cloudfront.
application_controller
:
after_filter :set_access_control_headers
def set_access_control_headers
headers['Access-Control-Allow-Origin'] = CDN_CLOUDFRONT
end
production.rb
:
CDN_CLOUDFRONT = "http://xxx.cloudfront.net"
This worked very well until yesterday. After several searches and reflections, I have not found a solution.
Any idea?