From: ThibG Date: Thu, 21 Mar 2019 22:33:18 +0000 (+0100) Subject: Mark the 410 gone response for suspended accounts as cachable (#10339) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=236191794412724f865b99bf5c0bb7c33a51ae67;p=mastodon.git Mark the 410 gone response for suspended accounts as cachable (#10339) This will help a great deal with #9377 when a caching reverse proxy is configured. --- diff --git a/app/controllers/concerns/account_controller_concern.rb b/app/controllers/concerns/account_controller_concern.rb index 8817fd7de..4f28941ae 100644 --- a/app/controllers/concerns/account_controller_concern.rb +++ b/app/controllers/concerns/account_controller_concern.rb @@ -69,6 +69,10 @@ module AccountControllerConcern end def check_account_suspension - gone if @account.suspended? + if @account.suspended? + skip_session! + expires_in(3.minutes, public: true) + gone + end end end