Преглед на файлове

Update CSP for development as per Webpacker recommendation

Andrew Swistak преди 7 години
родител
ревизия
99f9ef4945
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      config/initializers/content_security_policy.rb

+ 3 - 0
config/initializers/content_security_policy.rb

@@ -23,3 +23,6 @@
 # For further information see the following documentation:
 # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
 # Rails.application.config.content_security_policy_report_only = true
+Rails.application.config.content_security_policy do |policy|
+  policy.connect_src :self, :https, 'http://localhost:3035', 'ws://localhost:3035' if Rails.env.development?
+end