ericallam / font_assets

Helps with serving font assets with Rails 3.1
137 stars 79 forks source link

Generalizing to non-font assets? #28

Open hspinks opened 10 years ago

hspinks commented 10 years ago

I am deploying a Rails 4 application using AngularJS as our front-end MVC framework, and I'd like to deploy our assets through a CDN (Amazon Cloudfront), but am running into CORS issues with the HTML templates for AngularJS.

Because the Rails default is to only add the proper headers to requests for JS, CSS, and image files, and this gem also adds them for webfonts, I thought you might have some insights on how to address the issue I'm facing with HTML templates.

Is it possible to generalize this gem to also apply to HTML? I played around with it a bit, but couldn't find a way to get it to work with my situation.

I also posted a Stack Overflow question with a few more details/links: http://stackoverflow.com/q/23377343/2434476