mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: canonical url should not use the CDN
This commit is contained in:
@@ -6,8 +6,12 @@ module UrlHelper
|
||||
url.start_with?(Discourse.asset_host || Discourse.base_url_no_prefix)
|
||||
end
|
||||
|
||||
def absolute(url)
|
||||
url =~ /^\/[^\/]/ ? (Discourse.asset_host || Discourse.base_url_no_prefix) + url : url
|
||||
def absolute(url, cdn = Discourse.asset_host)
|
||||
url =~ /^\/[^\/]/ ? (cdn || Discourse.base_url_no_prefix) + url : url
|
||||
end
|
||||
|
||||
def absolute_without_cdn(url)
|
||||
absolute(url, nil)
|
||||
end
|
||||
|
||||
def schemaless(url)
|
||||
|
Reference in New Issue
Block a user