0

我正在使用asset_sync gem for rails在Amazon S3中托管twitter 引导资产。即使在除 Firefox 之外的其他浏览器上发出一点警告,我似乎也能正常工作。在 Firefox 中,它显示奇怪的字符而不是引导字体图标。使用firebug控制台引发的错误如下:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at  ... s3.amazonaws.com/assets/bootstrap/glyphicons-halflings-regular-70bff989a367eacb2d18f3a9fecf84ab.woff. This can be fixed by moving the resource to the same domain or enabling CORS.

谁能帮我解决这个问题。

4

1 回答 1

-1

我的方法是将您的字体放在单独的文件中,并使用普通<link>标签将其包含在您的布局中。更多细节在这里:http ://thelazylog.com/posts/resolve-cors-fonts-issue-on-firefox-and-now-chrome-too-with-rails-assets-pipeline

于 2014-09-06T13:38:41.580 回答