Created
March 5, 2013 22:47
-
-
Save hughevans/5095061 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Enable serving of images, stylesheets, and JavaScripts from an asset server | |
| # Load fonts from S3 only and not CloudFront because of cached CORS header issue | |
| config.action_controller.asset_host = Proc.new do |source| | |
| if source =~ /(.woff|.eot|.ttf)/ | |
| "http://#{ENV['ASSETS_AWS_BUCKET']}.s3-#{ENV['ASSETS_AWS_REGION']}.amazonaws.com" | |
| else | |
| "http://#{ENV["ASSETS_CLOUD_FRONT_DOMAIN"]}" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment