base_controller.rb 276 B

123456789
  1. # frozen_string_literal: true
  2. class Api::Web::BaseController < Api::BaseController
  3. protect_from_forgery with: :exception
  4. rescue_from ActionController::InvalidAuthenticityToken do
  5. render json: { error: "Can't verify CSRF token authenticity." }, status: 422
  6. end
  7. end