Class: Contrast::Agent::Assess::Rule::Response::XContentType
- Inherits:
-
HeaderRule
- Object
- BaseRule
- HeaderRule
- Contrast::Agent::Assess::Rule::Response::XContentType
- Defined in:
- lib/contrast/agent/assess/rule/response/x_content_type_header_rule.rb
Overview
These rules check the content of the HTTP Response to determine if the response contains the needed header
Constant Summary collapse
- HEADER_KEYS =
%w[X-Content-Type-Options].cs__freeze
- ACCEPTED_VALUES =
[/^nosniff/i].cs__freeze
- DEFAULT_SAFE =
false
Constants inherited from HeaderRule
Constants inherited from BaseRule
Instance Method Summary collapse
Methods inherited from HeaderRule
#analyze_response?, #headers?, #violated?
Methods inherited from BaseRule
Instance Method Details
#rule_id ⇒ Object
18 19 20 |
# File 'lib/contrast/agent/assess/rule/response/x_content_type_header_rule.rb', line 18 def rule_id 'xcontenttype-header-missing' end |