method

verify_same_origin_request

rails latest stable - Class: ActionController::RequestForgeryProtection
verify_same_origin_request()
private

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.