From 236191794412724f865b99bf5c0bb7c33a51ae67 Mon Sep 17 00:00:00 2001
From: ThibG <thib@sitedethib.com>
Date: Thu, 21 Mar 2019 23:33:18 +0100
Subject: [PATCH] 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.
---
 app/controllers/concerns/account_controller_concern.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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
-- 
GitLab