instance method
verify_same_origin_request
Ruby on Rails edge
Since v4.1.16 Private — implementation detail, not part of the public APISignature
verify_same_origin_request()
If verify_request_for_forgery_protection 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 566
def verify_same_origin_request # :doc:
if marked_for_same_origin_verification? && non_xhr_javascript_response?
instrument_cross_origin_javascript
raise ActionController::InvalidCrossOriginRequest, CROSS_ORIGIN_JAVASCRIPT_WARNING
end
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 566
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection