]> cat aescling's git repositories - mastodon.git/commitdiff
Fix OCR not working on Safari because of unsupported worker-src CSP (#13323)
authorThibG <thib@sitedethib.com>
Fri, 27 Mar 2020 21:35:57 +0000 (22:35 +0100)
committerGitHub <noreply@github.com>
Fri, 27 Mar 2020 21:35:57 +0000 (22:35 +0100)
Fixes #13321

config/initializers/content_security_policy.rb

index af7d16aafc521f39556012e185b8af3e865b2761..654e2e8cdefc0cc6ae5f0688acc716490ec1183e 100644 (file)
@@ -32,10 +32,12 @@ Rails.application.config.content_security_policy do |p|
 
     p.connect_src :self, :data, :blob, assets_host, media_host, Rails.configuration.x.streaming_api_base_url, *webpacker_urls
     p.script_src  :self, :unsafe_inline, :unsafe_eval, assets_host
+    p.child_src   :self, :blob, assets_host
     p.worker_src  :self, :blob, assets_host
   else
     p.connect_src :self, :data, :blob, assets_host, media_host, Rails.configuration.x.streaming_api_base_url
     p.script_src  :self, assets_host
+    p.child_src   :self, :blob, assets_host
     p.worker_src  :self, :blob, assets_host
   end
 end