From 49ad6d338197eb8cf6893ea6dd6578a6a1a99295 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 11 Aug 2019 22:59:40 +0200 Subject: Fix ActivityPub and REST API queries setting cookies and preventing caching (#11539) Regression from #8657 --- app/controllers/api/base_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/api/base_controller.rb') 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 -- cgit