mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:31:10 +08:00
FEATURE: Optionally allow a separate s3_asset_cdn_url
to be specified (#19284)
If configured, this will be used for static JS assets which are stored on S3. This can be useful if you want to use different CDN providers/configuration for Uploads and JS
This commit is contained in:
@ -88,6 +88,12 @@ RSpec.describe ApplicationHelper do
|
||||
link = helper.preload_script('discourse/tests/theme_qunit_ember_jquery')
|
||||
expect(link).to eq(script_tag("https://s3cdn.com/assets/discourse/tests/theme_qunit_ember_jquery.js"))
|
||||
end
|
||||
|
||||
it "uses separate asset CDN if configured" do
|
||||
global_setting :s3_asset_cdn_url, "https://s3-asset-cdn.example.com"
|
||||
expect(helper.preload_script("discourse")).to include("https://s3-asset-cdn.example.com/assets/discourse.js")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user