From c248a84d1bdefdd0d5aceaff79dc3ac2468eb96f Mon Sep 17 00:00:00 2001 From: Frank Groeneveld Date: Mon, 10 Feb 2025 14:52:07 +0100 Subject: [PATCH] Add nonce for strict Content Security Policy --- lib/hotwire/spark/middleware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hotwire/spark/middleware.rb b/lib/hotwire/spark/middleware.rb index a80961c..f62e169 100644 --- a/lib/hotwire/spark/middleware.rb +++ b/lib/hotwire/spark/middleware.rb @@ -40,7 +40,7 @@ def inject_javascript(html) def script_tag script_path = view_helpers.path_to_asset("hotwire_spark.js") - view_helpers.javascript_include_tag(script_path, defer: "") + view_helpers.javascript_include_tag(script_path, defer: "", nonce: true) end def view_helpers