Public Class methods
new()
Unset any content security policy when reinitializing
[show source]
# File lib/roda/plugins/content_security_policy.rb 300 def initialize 301 super 302 @content_security_policy &&= nil 303 end
Public Instance methods
content_security_policy()
The current content security policy to be used for this response.
[show source]
# File lib/roda/plugins/content_security_policy.rb 306 def content_security_policy 307 @content_security_policy ||= roda_class.opts[:content_security_policy].dup 308 end
skip_content_security_policy!()
Do not set a content security policy header for this response.
[show source]
# File lib/roda/plugins/content_security_policy.rb 311 def skip_content_security_policy! 312 @skip_content_security_policy = true 313 end