lib/secure_headers.rb
# Public: override a given set of directives for the current request. If a
# value already exists for a given directive, it will be overridden.
#
# If CSP was previously OPT_OUT, a new blank policy is used.
#
# additions - a hash containing directives. e.g.
#    script_src: %w(another-host.com)
override a given set of directives for the current request. If a
value already exists for a given directive, it will be overridden.

If CSP was previously OPT_OUT, a new blank policy is used.

a hash containing directives.
override a given set of directives for the current request . If a value already exists for a given directive it will be overridden . If CSP was previously OPT_OUT a new blank policy is used . a hash containing directives .
def guess_target(config)
      if !config.csp.opt_out? && !config.csp_report_only.opt_out?
        :both
      elsif !config.csp.opt_out?
        :enforced
      elsif !config.csp_report_only.opt_out?
        :report_only
      else
        :both
      end
    end
def guess_target ( config ) if ! config . csp . opt_out? && ! config . csp_report_only . opt_out? :both elsif ! config . csp . opt_out? :enforced elsif ! config . csp_report_only . opt_out? :report_only else :both end end
Public: override a given set of directives for the current request.
Public : override a given set of directives for the current request .
config