mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
don't use startsWith just yet
This commit is contained in:
parent
b08ab829b8
commit
a21d52951a
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue