lib/rollbar/middleware/js.rb in rollbar-2.15.0 vs lib/rollbar/middleware/js.rb in rollbar-2.15.1
- old
+ new
@@ -148,9 +148,10 @@
end
def append_nonce?
defined?(::SecureHeaders) && ::SecureHeaders.respond_to?(:content_security_policy_script_nonce) &&
defined?(::SecureHeaders::Configuration) &&
+ !::SecureHeaders::Configuration.get.csp.opt_out? &&
!::SecureHeaders::Configuration.get.current_csp[:script_src].to_a.include?("'unsafe-inline'")
end
end
end
end