From 03569b5e2e3a9aee55a44b261f6dbe40b4eed961 Mon Sep 17 00:00:00 2001 From: Nick Barnwell Date: Tue, 5 May 2015 08:33:11 -0700 Subject: [PATCH] Configure production assets to be served from CDN This allows the asset host to be reconfigured from an environment variable. For now, it will be `http://dcu7hky3kqbj1.cloudfront.net`. If I manage to get a CNAME set up by EoD, I'll switch it to `cdn.teawithstrangers.com` or similar. --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index dc21c56f..26d09549 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -55,7 +55,7 @@ # config.cache_store = :mem_cache_store # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = "http://assets.example.com" + config.action_controller.asset_host = ENV['CDN_ASSET_HOST'] # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.