mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: make it possible to enable cdn in development environment.
This commit is contained in:
parent
6977f78266
commit
1504fe7231
@ -77,7 +77,7 @@ module ApplicationHelper
|
|||||||
path = path.gsub(/\.([^.]+)$/, '.gz.\1')
|
path = path.gsub(/\.([^.]+)$/, '.gz.\1')
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif GlobalSetting.cdn_url&.start_with?("https") && is_brotli_req?
|
elsif GlobalSetting.cdn_url&.start_with?("https") && is_brotli_req? && Rails.env != "development"
|
||||||
path = path.gsub("#{GlobalSetting.cdn_url}/assets/", "#{GlobalSetting.cdn_url}/brotli_asset/")
|
path = path.gsub("#{GlobalSetting.cdn_url}/assets/", "#{GlobalSetting.cdn_url}/brotli_asset/")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ Discourse::Application.configure do
|
|||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
|
config.action_controller.asset_host = GlobalSetting.cdn_url
|
||||||
|
|
||||||
# Print deprecation notices to the Rails logger
|
# Print deprecation notices to the Rails logger
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user