diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7e9a6e9..fde4284 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base skip_before_action :verify_authenticity_token, if: :api_request? def api_request? - user_token && request.format.json? + (user_token.present? || current_client.present?) && request.format.json? end rescue_from CanCan::AccessDenied do |exception|