diff options
author | ThibG <thib@sitedethib.com> | 2019-08-11 22:59:40 +0200 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-20 23:34:23 -0600 |
commit | 49ad6d338197eb8cf6893ea6dd6578a6a1a99295 (patch) | |
tree | 49bcf1b0db9e0839bcb94bd79e72d6d36f1ce300 /app/controllers/api | |
parent | 892b9a8476ed1007ae5ae499059e958f10ee6ba8 (diff) |
Fix ActivityPub and REST API queries setting cookies and preventing caching (#11539)
Regression from #8657
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/base_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index f5892f96c..ed73a9aa4 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -13,6 +13,8 @@ class Api::BaseController < ApplicationController protect_from_forgery with: :null_session + skip_around_action :set_locale + rescue_from ActiveRecord::RecordInvalid, Mastodon::ValidationError do |e| render json: { error: e.to_s }, status: 422 end |