mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 08:42:44 +08:00
get urlWithCDN before appending protocol
This commit is contained in:
parent
2720205f78
commit
9bf381b95c
|
@ -251,7 +251,8 @@ Discourse.Utilities = {
|
|||
|
||||
uploadLocation: function(url) {
|
||||
if (Discourse.CDN) {
|
||||
return Discourse.CDN.startsWith('//') ? "http:" + Discourse.getURLWithCDN(url) : Discourse.getURLWithCDN(url);
|
||||
url = Discourse.getURLWithCDN(url);
|
||||
return url.startsWith('//') ? 'http:' + url : url;
|
||||
} else if (Discourse.SiteSettings.enable_s3_uploads) {
|
||||
return 'https:' + url;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user