0

I am using asset_sync gem for rails to host twitter bootstrap asset in Amazon S3. I seems to works fine even with a little warning on other browsers except Firefox. In Firefox it shows strange character instead of bootstrap font icon. The error raise with firebug console as follow:

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.

Can anyone help me how to fix this problem.

channa ly
  • 9,479
  • 14
  • 53
  • 86

1 Answers1

-1

My method is to put your fonts in separate file and include it into your layout with normal <link> tag. More details here: http://thelazylog.com/posts/resolve-cors-fonts-issue-on-firefox-and-now-chrome-too-with-rails-assets-pipeline

The Lazy Log
  • 3,564
  • 2
  • 20
  • 27