Skip to content

Commit 9018103

Browse files
committed
update to allow JSON requests
1 parent ab6db06 commit 9018103

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/application_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
55
include Pundit::Authorization
66
rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
77

8-
protect_from_forgery with: :exception
8+
protect_from_forgery with: :exception, unless: -> { request.format.json? }
99

1010
layout :layout_by_resource
1111

0 commit comments

Comments
 (0)