访问我的网站时,我一直收到来自控制台的错误消息:
font from origin 'https://xxx.cloudfront.net' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.example.com' is therefore not allowed access.
Run Code Online (Sandbox Code Playgroud)
我尝试了一切:
配置了application.rb文件
config.font_assets.origin = 'http://example.com'
Run Code Online (Sandbox Code Playgroud)上的Cloudfront列入白名单的头在解释此文章到
Access-Control-Allow-Origin
Access-Control-Allow-Methods
Access-Control-Allow-Headers
Access-Control-Max-Age
Run Code Online (Sandbox Code Playgroud)但没有,零,虚无...
我在Heroku上使用Rails 4.1.