We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab6db06 commit 9018103Copy full SHA for 9018103
app/controllers/application_controller.rb
@@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
5
include Pundit::Authorization
6
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
7
8
- protect_from_forgery with: :exception
+ protect_from_forgery with: :exception, unless: -> { request.format.json? }
9
10
layout :layout_by_resource
11
0 commit comments