mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: absolute URL for CDN should always be rooted with a protocol
This commit is contained in:
@@ -9,6 +9,7 @@ class UrlHelper
|
||||
end
|
||||
|
||||
def self.absolute(url, cdn = Discourse.asset_host)
|
||||
cdn = "https:" << cdn if cdn && cdn =~ /^\/\//
|
||||
url =~ /^\/[^\/]/ ? (cdn || Discourse.base_url_no_prefix) + url : url
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user