diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-04 12:26:12 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-12-04 12:28:10 +0100 |
commit | 80c44ed9c19855d494ab26011dca0f6fbc644d0c (patch) | |
tree | a14d280f0fa88bfa6e3ef97fff26d50a632471b3 /app/helpers | |
parent | 290ffb63cdf4753bc30224619f182cc3db654e91 (diff) |
Do not autoplay videos, display play button instead. Use expiring links when using S3. Do not keep originals
for avatars/headers, resize avatars down to 120x120 instead of 300x300. Set cache headers on S3 stuff, also make it private (aka only accessible via expiring links to prevent hotlinking)
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/atom_builder_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/stream_entries_helper.rb | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/app/helpers/atom_builder_helper.rb b/app/helpers/atom_builder_helper.rb index 40bbe0491..953ccd438 100644 --- a/app/helpers/atom_builder_helper.rb +++ b/app/helpers/atom_builder_helper.rb @@ -112,13 +112,11 @@ module AtomBuilderHelper end def link_enclosure(xml, media) - xml.link(rel: 'enclosure', href: full_asset_url(media.file.url), type: media.file_content_type, length: media.file_file_size) + xml.link(rel: 'enclosure', href: full_asset_url(media.file.url(:original, false)), type: media.file_content_type, length: media.file_file_size) end def link_avatar(xml, account) - single_link_avatar(xml, account, :large, 300) - # single_link_avatar(xml, account, :medium, 96) - # single_link_avatar(xml, account, :small, 48) + single_link_avatar(xml, account, :original, 120) end def logo(xml, url) diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb index 1eb2ed058..4abb00b07 100644 --- a/app/helpers/stream_entries_helper.rb +++ b/app/helpers/stream_entries_helper.rb @@ -6,7 +6,7 @@ module StreamEntriesHelper end def avatar_for_status_url(status) - status.reblog? ? status.reblog.account.avatar.url(:large) : status.account.avatar.url(:large) + status.reblog? ? status.reblog.account.avatar.expiring_url(3600, :original) : status.account.avatar.expiring_url(3600, :original) end def entry_classes(status, is_predecessor, is_successor, include_threads) |