Module: Roda::RodaPlugins::ContentSecurityPolicy::ResponseMethods
- Defined in:
- lib/roda/plugins/content_security_policy.rb
Instance Method Summary collapse
-
#content_security_policy ⇒ Object
The current content security policy to be used for this response.
-
#initialize ⇒ Object
Unset any content security policy when reinitializing.
-
#skip_content_security_policy! ⇒ Object
Do not set a content security policy header for this response.
Instance Method Details
#content_security_policy ⇒ Object
The current content security policy to be used for this response.
306 307 308 |
# File 'lib/roda/plugins/content_security_policy.rb', line 306 def content_security_policy @content_security_policy ||= roda_class.opts[:content_security_policy].dup end |
#initialize ⇒ Object
Unset any content security policy when reinitializing
300 301 302 303 |
# File 'lib/roda/plugins/content_security_policy.rb', line 300 def initialize super @content_security_policy &&= nil end |
#skip_content_security_policy! ⇒ Object
Do not set a content security policy header for this response.
311 312 313 |
# File 'lib/roda/plugins/content_security_policy.rb', line 311 def skip_content_security_policy! @skip_content_security_policy = true end |