Module: Roda::RodaPlugins::ContentSecurityPolicy::InstanceMethods

Defined in:
lib/roda/plugins/content_security_policy.rb

Instance Method Summary collapse

Instance Method Details

#content_security_policy {|policy| ... } ⇒ Object

If a block is given, yield the current content security policy. Returns the current content security policy.

Yields:

  • (policy)


291
292
293
294
295
# File 'lib/roda/plugins/content_security_policy.rb', line 291

def content_security_policy
  policy = @_response.content_security_policy
  yield policy if defined?(yield)
  policy
end