Class: Contrast::Agent::Assess::Rule::Response::CacheControl

Inherits:
HeaderRule show all
Includes:
BodyRule
Defined in:
lib/contrast/agent/assess/rule/response/cache_control_header_rule.rb

Overview

These rules check the content of the HTTP Response to determine if the body or the headers include and/or set incorrectly the cache-control header

Constant Summary collapse

HEADER_KEYS =
%w[Cache-Control].cs__freeze
ACCEPTED_VALUES =
[/no-store/, /no-cache/].cs__freeze
DEFAULT_SAFE =
false
META_START_STR =
/<meta/i.cs__freeze
HEAD_TAG =
/<head>/i.cs__freeze
NAME =
'cache-control'

Constants inherited from HeaderRule

HeaderRule::HEADER_TYPE

Constants inherited from BaseRule

BaseRule::DATA

Instance Method Summary collapse

Methods inherited from HeaderRule

#analyze_response?, #headers?

Methods inherited from BaseRule

#analyze

Instance Method Details

#rule_idObject



26
27
28
# File 'lib/contrast/agent/assess/rule/response/cache_control_header_rule.rb', line 26

def rule_id
  'cache-controls-missing'
end