instance method
verify_same_origin_request
Ruby on Rails 6.1.7.10
Since v4.1.16 PrivateSignature
verify_same_origin_request()
If verify_authenticity_token was run (indicating that we have forgery protection enabled for this request) then also verify that we aren’t serving an unauthorized cross-origin response.
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 257
def verify_same_origin_request # :doc:
if marked_for_same_origin_verification? && non_xhr_javascript_response?
if logger && log_warning_on_csrf_failure
logger.warn CROSS_ORIGIN_JAVASCRIPT_WARNING
end
raise ActionController::InvalidCrossOriginRequest, CROSS_ORIGIN_JAVASCRIPT_WARNING
end
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 257
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection