DEV: Update for strict-dynamic CSP (#194)
This commit is contained in:
parent
87659e237b
commit
7361721ec0
|
@ -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])
|
||||||
|
|
Loading…
Reference in New Issue