Skip to content

Conversation

@frenkel
Copy link

@frenkel frenkel commented Feb 10, 2025

Without a nonce an application with the following config will have errors in the browser.

Rails.application.configure do
  config.content_security_policy do |policy|
    policy.script_src :strict_dynamic
  end
end

Error (translated):

The page settings have blocked the execution of a script (script-src-elem) at http://localhost:3000/assets/hotwire_spark-d7e0ee73.js because it violates the following directive: ‘script-src 'strict-dynamic' 'nonce-e46d3874a949188ba1c4f5bbb3f93f8c'’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant