Flowdock
method

build_directives

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: ContentSecurityPolicy
build_directives(context, nonce) private

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_dispatch/http/content_security_policy.rb, line 230
      def build_directives(context, nonce)
        @directives.map do |directive, sources|
          if sources.is_a?(Array)
            if nonce && nonce_directive?(directive)
              "#{directive} #{build_directive(sources, context).join(' ')} 'nonce-#{nonce}'"
            else
              "#{directive} #{build_directive(sources, context).join(' ')}"
            end
          elsif sources
            directive
          else
            nil
          end
        end
      end
Register or log in to add new notes.