1
0
Fork 0

Do not verify authenticity token for JSON requests

This commit is contained in:
Alex Kotov 2018-11-29 18:14:08 +05:00
parent 59f205cf3e
commit ee431d86d1
No known key found for this signature in database
GPG key ID: 4E831250F47DE154

View file

@ -1,4 +1,11 @@
# frozen_string_literal: true
class ApplicationController < ActionController::Base
skip_before_action :verify_authenticity_token, if: :json_request?
private
def json_request?
request.format.json?
end
end