]> cat aescling's git repositories - mastodon.git/commitdiff
Fix more ActivityPub queries setting cookies and preventing caching (#11557)
authorThibG <thib@sitedethib.com>
Mon, 12 Aug 2019 20:26:07 +0000 (22:26 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 12 Aug 2019 20:26:07 +0000 (22:26 +0200)
app/controllers/follower_accounts_controller.rb
app/controllers/following_accounts_controller.rb

index 6e873de5b6265cb067e95a72afb7e659a93c80f8..892c51cf498fa0253cd08071e061ee698b5acd34 100644 (file)
@@ -7,6 +7,8 @@ class FollowerAccountsController < ApplicationController
   before_action :require_signature!, if: -> { request.format == :json && authorized_fetch_mode? }
   before_action :set_cache_headers
 
+  skip_around_action :set_locale, if: -> { request.format == :json }
+
   def index
     respond_to do |format|
       format.html do
index 07d62f7dd1bd183ee0b6561d636733baa8c32757..653d9a486e250a444d49232797368e92173c36b9 100644 (file)
@@ -7,6 +7,8 @@ class FollowingAccountsController < ApplicationController
   before_action :require_signature!, if: -> { request.format == :json && authorized_fetch_mode? }
   before_action :set_cache_headers
 
+  skip_around_action :set_locale, if: -> { request.format == :json }
+
   def index
     respond_to do |format|
       format.html do