Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Security Policy prevents ACE workers from being created #87

Open
danxuliu opened this issue Feb 12, 2018 · 0 comments
Open

Content Security Policy prevents ACE workers from being created #87

danxuliu opened this issue Feb 12, 2018 · 0 comments
Labels

Comments

@danxuliu
Copy link
Member

Since the update from ACE 1.2.5 to ACE 1.2.8 the workers, which are used for syntax checking, no longer work. The following error can be seen in Chromium JavaScript console:

Refused to create a worker from 'blob:http://127.0.0.1:8000/33b08d1a-f3ea-4a32-90b0-a77579f9a95c' because it violates the following Content Security Policy directive: "script-src 'nonce-SmdaNmhHM1JLeHU3dW5pNmFVY3IwekphTGRQQkRZMElwMW1YdFRJSktWMD06UjBFQ3dGV0dIa3JQd2pMS0x6ZHlpbXNBWmVYMVlMMWEzd0Q1MEY1aWN4az0=' 'unsafe-eval'". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.

This happens in stable13 and current master branches.

Note that using return new Worker(workerUrl); (like it was done before) instead of return new Worker(blobURL); solves the problem (obviously that is not a fix; it just a little more information for whoever is going to fix this ;-) ).

@danxuliu danxuliu added the bug label Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant