~cytrogen/masto-fe

ref: 6b7c47311db19d44b5d2016a6d3f029427a67624 masto-fe/app/controllers/api/web/base_controller.rb -rw-r--r-- 276 bytes
6b7c4731 — Claire Merge commit '072112867b9a3ec090ad2c92d6363b47b2265d74' into glitch-soc/merge-upstream 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

class Api::Web::BaseController < Api::BaseController
  protect_from_forgery with: :exception

  rescue_from ActionController::InvalidAuthenticityToken do
    render json: { error: "Can't verify CSRF token authenticity." }, status: 422
  end
end