ericallam / font_assets

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

Can't see ACCESS-CONTROL in headers #44

Open ManuelFrigerio opened 9 years ago

ManuelFrigerio commented 9 years ago

I followed your example but I can't manage to see these headers:

Access-Control-Allow-Origin: http://www.codeschool.com
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: x-requested-with
Access-Control-Max-Age: 3628800

I'm using Rails 4.1, Phusion Passenger an deploying on Heroku. I precompile assets locally, if that counts.

Once this work I want to use CloudFront as CDN.

Can you please advice?

Thanks

edlebert commented 9 years ago

I'm seeing the same thing. Investigating.

ericallam commented 9 years ago

The font assets must be served by the rails process for this gem to work (because Rails injects those headers into the response). It's possible your static assets are being served by phusion passenger outside of the rails stack.

ManuelFrigerio commented 9 years ago

Are you saying that this gem doesn't work with Phusion Passenger?