class ActionDispatch::Request

def key?(key)

request.key? :ip_spoofing_check # => true

Returns true if the request has a header matching the given key parameter.
def key?(key)
  has_header? key
end