diff options
author | Stan Hu <stanhu@gmail.com> | 2017-06-12 21:48:32 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-06-15 09:15:22 +0300 |
commit | 96be3a4549e2621c5c931c8699295823fa2d6d84 (patch) | |
tree | dccdfd003b68d273a11fffd4b9092aa3f22261d2 /config/environments | |
parent | 42aaae9916b7b76da968579fcc722067947df018 (diff) |
Support a configurable Rails asset_host to allow for CDNs
Adds support for https://gitlab.com/gitlab-com/infrastructure/issues/57
Diffstat (limited to 'config/environments')
-rw-r--r-- | config/environments/production.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb index 82a19085b1d..87b94d74506 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -50,7 +50,7 @@ Rails.application.configure do # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # 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_HOST'] if ENV['CDN_HOST'].present? # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # config.assets.precompile += %w( search.js ) |