Fix CDN_HOST not affected on full_asset_url (#18662)

* Fix CDN_HOST not affected to assets url

* Fix typo
lolsob-rspec
Jeong Arm 2022-06-24 06:09:32 +09:00 committed by GitHub
parent 2cb4c0caed
commit 5c38a4492b
1 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,11 @@ module RoutingHelper
def full_asset_url(source, **options)
source = ActionController::Base.helpers.asset_url(source, **options) unless use_storage?
URI.join(root_url, source).to_s
URI.join(asset_host, source).to_s
end
def asset_host
Rails.configuration.action_controller.asset_host || root_url
end
def full_pack_url(source, **options)