Revert "FIX: GlobalPath#upload_cdn_path when S3 bucket has a folder (#6523)"

This reverts commit 63356d883ebf6d37b8f9c6a813a240920b6e304c.

This caused an outage, got to revert
This commit is contained in:
Sam
2018-10-24 15:03:58 +11:00
parent 63356d883e
commit 322b27b6dc
2 changed files with 1 additions and 13 deletions

View File

@ -9,7 +9,7 @@ module GlobalPath
def upload_cdn_path(p)
if SiteSetting.Upload.s3_cdn_url.present?
p = Discourse.store.cdn_url(p)
p = p.sub(Discourse.store.absolute_base_url, SiteSetting.Upload.s3_cdn_url)
end
p =~ /^http/ ? p : cdn_path(p)
end