From fa7dd5c2cdadb6d1f309857f1634651b24dcb46b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 2 Oct 2019 04:53:17 +0200 Subject: Fix featured hashtag URL being interpreted as media or with_replies (#12048) Fix #12034 --- app/controllers/accounts_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/accounts_controller.rb') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 1dab5d5f2..9c7ef6170 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -129,11 +129,11 @@ class AccountsController < ApplicationController end def media_requested? - request.path.ends_with?('/media') + request.path.ends_with?('/media') && !tag_requested? end def replies_requested? - request.path.ends_with?('/with_replies') + request.path.ends_with?('/with_replies') && !tag_requested? end def tag_requested? -- cgit From 699f53c464c6d6376b25b6b5fafd1caaa983f737 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 2 Oct 2019 18:30:33 +0200 Subject: Fix RSS caching (but disable localization) (#12054) --- app/controllers/accounts_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/accounts_controller.rb') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 9c7ef6170..0a8015a56 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -9,7 +9,7 @@ class AccountsController < ApplicationController before_action :set_cache_headers before_action :set_body_classes - skip_around_action :set_locale, if: -> { request.format == :json } + skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format) } skip_before_action :require_functional! def show @@ -38,7 +38,7 @@ class AccountsController < ApplicationController end format.rss do - expires_in 0, public: true + expires_in 1.minute, public: true @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) @statuses = cache_collection(@statuses, Status) -- cgit