diff options
author | nightpool <eg1290@gmail.com> | 2018-01-08 14:01:33 -0500 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-01-08 20:01:33 +0100 |
commit | c235711ffee6999c09bd6910373ebcfbc7758e99 (patch) | |
tree | 40efb018ab3fdc58d933d5ef09a95c56f0ef298d /app/controllers/api | |
parent | ff6ca8bdc6e4ae42c571fecbab8ddc8817638c31 (diff) |
Refactor /api/web APIs to use the centralized axios instance (#6223)
Also adds the ability to decouple the centralized axios logic from the state dispatcher
Diffstat (limited to 'app/controllers/api')
-rw-r--r-- | app/controllers/api/base_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index 5983c0fbe..52e68ab35 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -6,8 +6,8 @@ class Api::BaseController < ApplicationController include RateLimitHeaders - skip_before_action :verify_authenticity_token skip_before_action :store_current_location + protect_from_forgery with: :null_session rescue_from ActiveRecord::RecordInvalid, Mastodon::ValidationError do |e| render json: { error: e.to_s }, status: 422 |