DEV: Update for strict-dynamic CSP (#194)

This commit is contained in:
David Taylor 2024-03-06 16:45:55 +00:00 committed by GitHub
parent 87659e237b
commit 7361721ec0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ register_asset "stylesheets/common/campaign.scss"
register_asset "stylesheets/mobile/main.scss" register_asset "stylesheets/mobile/main.scss"
register_svg_icon "far-credit-card" if respond_to?(:register_svg_icon) register_svg_icon "far-credit-card" if respond_to?(:register_svg_icon)
register_html_builder("server:before-head-close") do register_html_builder("server:before-head-close") do |controller|
"<script src='https://js.stripe.com/v3/'></script>" "<script src='https://js.stripe.com/v3/' nonce='#{controller.helpers.csp_nonce_placeholder}'></script>"
end end
extend_content_security_policy(script_src: %w[https://js.stripe.com/v3/ https://hooks.stripe.com]) extend_content_security_policy(script_src: %w[https://js.stripe.com/v3/ https://hooks.stripe.com])