Module: ActionDispatch::ContentSecurityPolicy::Request
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
::ActionCable::Connection::TestRequest ,
ActionController::TestRequest,
::ActionDispatch::Request ,
::ActionDispatch::TestRequest
| |
Defined in: | actionpack/lib/action_dispatch/http/content_security_policy.rb |
Constant Summary
-
NONCE =
# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 51"action_dispatch.content_security_policy_nonce"
-
NONCE_DIRECTIVES =
# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 52"action_dispatch.content_security_policy_nonce_directives"
-
NONCE_GENERATOR =
# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 50"action_dispatch.content_security_policy_nonce_generator"
-
POLICY =
# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 48"action_dispatch.content_security_policy"
-
POLICY_REPORT_ONLY =
# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 49"action_dispatch.content_security_policy_report_only"
Instance Attribute Summary
- #content_security_policy rw
- #content_security_policy=(policy) rw
- #content_security_policy_nonce_directives rw
- #content_security_policy_nonce_directives=(generator) rw
- #content_security_policy_nonce_generator rw
- #content_security_policy_nonce_generator=(generator) rw
- #content_security_policy_report_only rw
- #content_security_policy_report_only=(value) rw
Instance Method Summary
Instance Attribute Details
#content_security_policy (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 54
def content_security_policy get_header(POLICY) end
#content_security_policy=(policy) (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 58
def content_security_policy=(policy) set_header(POLICY, policy) end
#content_security_policy_nonce_directives (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 78
def content_security_policy_nonce_directives get_header(NONCE_DIRECTIVES) end
#content_security_policy_nonce_directives=(generator) (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 82
def content_security_policy_nonce_directives=(generator) set_header(NONCE_DIRECTIVES, generator) end
#content_security_policy_nonce_generator (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 70
def content_security_policy_nonce_generator get_header(NONCE_GENERATOR) end
#content_security_policy_nonce_generator=(generator) (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 74
def content_security_policy_nonce_generator=(generator) set_header(NONCE_GENERATOR, generator) end
#content_security_policy_report_only (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 62
def content_security_policy_report_only get_header(POLICY_REPORT_ONLY) end
#content_security_policy_report_only=(value) (rw)
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 66
def content_security_policy_report_only=(value) set_header(POLICY_REPORT_ONLY, value) end
Instance Method Details
#content_security_policy_nonce
[ GitHub ]# File 'actionpack/lib/action_dispatch/http/content_security_policy.rb', line 86
def content_security_policy_nonce if content_security_policy_nonce_generator if nonce = get_header(NONCE) nonce else set_header(NONCE, generate_content_security_policy_nonce) end end end