FIX: Incorrect CDN URL for site setting uploads when s3 is enabled.

This commit is contained in:
Guo Xiang Tan
2019-01-04 07:50:35 +08:00
parent 6961a4f43e
commit 5f0f7f909d
2 changed files with 12 additions and 1 deletions

View File

@ -11,7 +11,8 @@ module GlobalPath
if SiteSetting.Upload.s3_cdn_url.present?
p = Discourse.store.cdn_url(p)
end
p =~ /^http/ ? p : cdn_path(p)
(p =~ /^http/ || p =~ /^\/\//) ? p : cdn_path(p)
end
def cdn_relative_path(path)