Also skip CSRF check for clients (Tap)
This commit is contained in:
parent
fe9458dc5d
commit
4fb4385ba5
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
|
||||||
skip_before_action :verify_authenticity_token, if: :api_request?
|
skip_before_action :verify_authenticity_token, if: :api_request?
|
||||||
|
|
||||||
def api_request?
|
def api_request?
|
||||||
user_token && request.format.json?
|
(user_token.present? || current_client.present?) && request.format.json?
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue_from CanCan::AccessDenied do |exception|
|
rescue_from CanCan::AccessDenied do |exception|
|
||||||
|
|
Loading…
Reference in a new issue