Skip to content

Commit

Permalink
Fix OCR not working on Safari because of unsupported worker-src CSP
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Mar 27, 2020
1 parent 6c79b72 commit 0b4f8c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ def host_to_url(str)

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
Expand Down

0 comments on commit 0b4f8c9

Please sign in to comment.