From b203b1dea7808e554dcab6504144e4648e239e83 Mon Sep 17 00:00:00 2001 From: Ed Davey Date: Wed, 9 Oct 2024 18:24:06 +0100 Subject: [PATCH] Allow Turbo progress bar style to be loaded --- config/initializers/content_security_policy.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 731b1d8..cfeee94 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -12,7 +12,10 @@ policy.img_src :self, :https, :data policy.object_src :none policy.script_src :self, :https - policy.style_src :self, :https + + # allow styling for the Turbo progress bar + policy.style_src("'sha256-WAyOw4V+FqDc35lQPyRADLBWbuNK8ahvYEaQIYF1+Ps='", :self, :https) + # If you are using webpack-dev-server then specify webpack-dev-server host # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?