Method: ActionDispatch::Request#key?

Defined in:
lib/action_dispatch/http/request.rb

#key?(key) ⇒ Boolean

Returns true if the request has a header matching the given key parameter.

request.key? :ip_spoofing_check # => true

Returns:

  • (Boolean)


114
115
116
# File 'lib/action_dispatch/http/request.rb', line 114

def key?(key)
  has_header? key
end