How-To Implement Cross-Browser @font-face Support in rails
-
25-09-2019 - |
Question
I am developing a small rails app to serve fonts to other sites
say a request http://url/fonts/fontname will return woff,eot or ttf font based on the browser type.
This app is working fine in my localhost but not in other ip... I know the problem is something to do with Cross-Origin Resource Sharing restriction but don't know how to solve this....
I am using Mongrel...
Solution
You said you have access to the other sites' files.
Well then you just need to add Header set Access-Control-Allow-Origin *
to your .htaccess file on the targeted websites.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow