21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-25 21:40:49 +02:00

allow bloc scheme for styles in development

This commit is contained in:
Jérémy Lecour 2019-08-19 23:58:14 +02:00
parent 4be23aaba7
commit 469c158217

View file

@ -10,7 +10,11 @@ Rails.application.config.content_security_policy do |policy|
policy.img_src :self, :https, :data policy.img_src :self, :https, :data
policy.object_src :none policy.object_src :none
policy.script_src :self, :https 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 # 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? policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?