actionpack/lib/action_controller/metal/request_forgery_protection.rb
# Checks if the request originated from the same origin by looking at the
# Origin header.
Checks if the request originated from the same origin by looking at the
Origin header.
Checks if the request originated from the same origin by looking at the Origin header .
def valid_request_origin? 
        if forgery_protection_origin_check
          raise InvalidAuthenticityToken, NULL_ORIGIN_MESSAGE if request.origin == "null"
          request.origin.nil? || request.origin == request.base_url
        else
          true
        end
      end
def valid_request_origin? if forgery_protection_origin_check raise InvalidAuthenticityToken , NULL_ORIGIN_MESSAGE if request . origin == "null" request . origin . nil? || request . origin == request . base_url else true end end
Checks if the request originated from the same origin by looking at the
Origin header.
Checks if the request originated from the same origin by looking at the Origin header .
# :doc: # We accept blank origin headers because some user agents don't send it.