Skip to content

Commit

Permalink
Mark the 410 gone response for suspended accounts as cachable (mastod…
Browse files Browse the repository at this point in the history
…on#10339)

This will help a great deal with mastodon#9377 when a caching reverse proxy is
configured.
  • Loading branch information
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent 0062b1f commit 1c54cc4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/concerns/account_controller_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ def check_account_approval
end

def check_account_suspension
gone if @account.suspended?
if @account.suspended?
skip_session!
expires_in(3.minutes, public: true)
gone
end
end
end

0 comments on commit 1c54cc4

Please sign in to comment.