Browse Source

allow bloc scheme for styles in development

rails6
Jérémy Lecour 1 year ago
parent
commit
469c158217
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      config/initializers/content_security_policy.rb

+ 5
- 1
config/initializers/content_security_policy.rb View File

@ -10,7 +10,11 @@ Rails.application.config.content_security_policy do |policy|
policy.img_src :self, :https, :data
policy.object_src :none
policy.script_src :self, :https
policy.style_src :self, :https
if Rails.env.development?
policy.style_src :self, :https, :blob
else
policy.style_src :self, :https
end
# 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?


Loading…
Cancel
Save