Revert "DEV: Disable ACE editor worker blobs"
This reverts commit d5463d2a4d
.
With S3 assets, CORS prevents loading worker assets directly.
This commit is contained in:
parent
35d9d668c3
commit
3cf93e9a8f
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,8 @@ class ContentSecurityPolicy
|
|||
|
||||
def worker_src
|
||||
[
|
||||
"'self'",
|
||||
"blob:",
|
||||
*script_assets(worker: true)
|
||||
]
|
||||
end
|
||||
|
|
|
@ -33,9 +33,11 @@ describe ContentSecurityPolicy do
|
|||
end
|
||||
|
||||
describe 'worker-src' do
|
||||
it 'always has script srcs' do
|
||||
it 'has expected values' do
|
||||
worker_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/
|
||||
|
|
Loading…
Reference in New Issue