instance method
verify_same_origin_request
Ruby on Rails 4.1.16
Since v4.1.16Signature
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 214
def verify_same_origin_request
if marked_for_same_origin_verification? && non_xhr_javascript_response?
logger.warn CROSS_ORIGIN_JAVASCRIPT_WARNING if logger
raise ActionController::InvalidCrossOriginRequest, CROSS_ORIGIN_JAVASCRIPT_WARNING
end
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 214
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection