discourse/app/helpers
Jeff Wong 893b50031d
replace subfolder on cdn url conversion between general cdn and s3 (#7764)
When both a cdn URL and an s3 cdn URL defined, subfolder paths were leaking
through to the s3 cdn URL. If we are replacing the cdn url with the s3_cdn url,
we also need to make sure that the subpath is removed as well, as it appears in
the original cdn url.

The test should give a fairly good gist of the situations - in subfolder
situations where s3_cdn and a cdn is defined:
`asset_path` returns the asset with a subfolder, in the form `{cdn_url}/{subfolder}/{asset_path}`

Currently this is being replaced to `{s3_cdn_url}/{subfolder}/{asset_path}`
I am proposing we change this to: `{s3_cdn_url}/{asset_path}` as it seems like
for s3_cdn urls we should not be carrying around app subfolder pathing anywhere
we are looking up s3 paths.
2019-06-17 11:51:17 -07:00
..
application_helper.rb replace subfolder on cdn url conversion between general cdn and s3 (#7764) 2019-06-17 11:51:17 -07:00
common_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
email_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
embed_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
list_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
topics_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
user_notifications_helper.rb Make `email_excerpt` method take an optional `post` param (#7570) 2019-05-20 10:04:23 +02:00