don't use startsWith just yet
This commit is contained in:
parent
b08ab829b8
commit
a21d52951a
|
@ -226,7 +226,7 @@ export function authorizedExtensions() {
|
|||
export function uploadLocation(url) {
|
||||
if (Discourse.CDN) {
|
||||
url = Discourse.getURLWithCDN(url);
|
||||
return url.startsWith('//') ? 'http:' + url : url;
|
||||
return /^\/\//.test(url) ? 'http:' + url : url;
|
||||
} else if (Discourse.SiteSettings.enable_s3_uploads) {
|
||||
return 'https:' + url;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue