aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/csp_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view/helpers/csp_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/csp_helper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/csp_helper.rb b/actionview/lib/action_view/helpers/csp_helper.rb
index e2e065c218..4415018845 100644
--- a/actionview/lib/action_view/helpers/csp_helper.rb
+++ b/actionview/lib/action_view/helpers/csp_helper.rb
@@ -14,9 +14,11 @@ module ActionView
# This is used by the Rails UJS helper to create dynamically
# loaded inline <script> elements.
#
- def csp_meta_tag
+ def csp_meta_tag(**options)
if content_security_policy?
- tag("meta", name: "csp-nonce", content: content_security_policy_nonce)
+ options[:name] = "csp-nonce"
+ options[:content] = content_security_policy_nonce
+ tag("meta", options)
end
end
end