Jelajahi Sumber

Update CSP for development as per Webpacker recommendation

Andrew Swistak 7 tahun lalu
induk
melakukan
99f9ef4945
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  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