From a2bdf1226f6fe7d607f7c8bc7d1de204f3c76228 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 2 Oct 2019 18:30:33 +0200 Subject: port tootsuite#12054 to monsterfork: Fix RSS caching (but disable localization) --- app/controllers/accounts_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 541a82b2e..7197c16b1 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 @@ -47,6 +47,7 @@ class AccountsController < ApplicationController format.rss do expires_in 1.minute, public: true +<<<<<<< HEAD if current_account&.user&.allows_rss? @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE) @@ -54,6 +55,8 @@ class AccountsController < ApplicationController else @statuses = [] end +======= +>>>>>>> 699f53c46... Fix RSS caching (but disable localization) (#12054) render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag]) end -- cgit