module ActionDispatch::ContentSecurityPolicy::Request
Constants
- NONCE
- NONCE_DIRECTIVES
- NONCE_GENERATOR
- POLICY
- POLICY_REPORT_ONLY
Public Instance Methods
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 75 def content_security_policy get_header(POLICY) end
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 79 def content_security_policy=(policy) set_header(POLICY, policy) end
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 107 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
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 99 def content_security_policy_nonce_directives get_header(NONCE_DIRECTIVES) end
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 103 def content_security_policy_nonce_directives=(generator) set_header(NONCE_DIRECTIVES, generator) end
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 91 def content_security_policy_nonce_generator get_header(NONCE_GENERATOR) end
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 95 def content_security_policy_nonce_generator=(generator) set_header(NONCE_GENERATOR, generator) end
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 83 def content_security_policy_report_only get_header(POLICY_REPORT_ONLY) end
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 87 def content_security_policy_report_only=(value) set_header(POLICY_REPORT_ONLY, value) end
Private Instance Methods
Source
# File lib/action_dispatch/http/content_security_policy.rb, line 118 def generate_content_security_policy_nonce content_security_policy_nonce_generator.call(self) end