edge badge
Methods
C
Instance Public methods
content_security_policy(**options, &block)
# File actionpack/lib/action_controller/metal/content_security_policy.rb, line 8
def content_security_policy(**options, &block)
  before_action(options) do
    if block_given?
      policy = request.content_security_policy.clone
      yield policy
      request.content_security_policy = policy
    end
  end
end
content_security_policy_report_only(report_only = true, **options)
# File actionpack/lib/action_controller/metal/content_security_policy.rb, line 18
def content_security_policy_report_only(report_only = true, **options)
  before_action(options) do
    request.content_security_policy_report_only = report_only
  end
end