A platform for community discussion. Free, open, simple.
Revert "DEV: Disable ACE editor worker blobs"
David Taylor3cf93e9a8f64
diff --git a/app/assets/javascripts/admin/components/ace-editor.js b/app/assets/javascripts/admin/components/ace-editor.jsindex 480a8969bf5..123193c0c0b 100644--- a/app/assets/javascripts/admin/components/ace-editor.js+++ b/app/assets/javascripts/admin/components/ace-editor.js@@ -74,8 +74,6 @@ export default Component.extend({loadScript("/javascripts/ace/ace.js").then(() => {window.ace.require(["ace/ace"], loadedAce => {- loadedAce.config.set("loadWorkerFromBlob", false);-if (!this.element || this.isDestroying || this.isDestroyed) {return;}diff --git a/lib/content_security_policy/default.rb b/lib/content_security_policy/default.rbindex 95d98fc7d82..43f076e022f 100644--- a/lib/content_security_policy/default.rb+++ b/lib/content_security_policy/default.rb@@ -63,6 +63,8 @@ class ContentSecurityPolicydef worker_src[+ "'self'",+ "blob:",*script_assets(worker: true)]enddiff --git a/spec/lib/content_security_policy_spec.rb b/spec/lib/content_security_policy_spec.rbindex 764bc03bf71..d7b60eb0a13 100644--- a/spec/lib/content_security_policy_spec.rb+++ b/spec/lib/content_security_policy_spec.rb@@ -33,9 +33,11 @@ describe ContentSecurityPolicy doenddescribe 'worker-src' do- it 'always has script srcs' do+ it 'has expected values' doworker_srcs = parse(policy)['worker-src']expect(worker_srcs).to eq(%w[+ 'self'+ blob:http://test.localhost/assets/http://test.localhost/brotli_asset/http://test.localhost/javascripts/