Flowdock
method

content_security_policy

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: ClassMethods
content_security_policy(enabled = true, **options, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/metal/content_security_policy.rb, line 17
      def content_security_policy(enabled = true, **options, &block)
        before_action(options) do
          if block_given?
            policy = current_content_security_policy
            yield policy
            request.content_security_policy = policy
          end

          unless enabled
            request.content_security_policy = nil
          end
        end
      end
Register or log in to add new notes.