Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Precompile Ajv Blueprint validator to avoid CSP issues (#1649)
## Motivation for the change, related issues [The Chrome Content Security Policy](https://developer.chrome.com/docs/privacy-security/csp) doesn't allow the use of eval and new Function. This prevents people from building Chrome extensions that interact with Playground. This PR is an alternative to #1647 and exists because the jsonschema library used by that PR did not generate user-friendly validation errors. Also, if we can stick with our current validation library, we might as well because it is more well-tested in the context of Playground. Fixes #1641 ## Implementation details This PR precompiles an Ajv-based Blueprint JSON validator to avoid CSP issues as suggested in the Ajv docs [here](https://github.com/ajv-validator/ajv/blob/9050ba1359fb87cd7c143f3c79513ea7624ea443/docs/security.md#content-security-policy). ## Testing Instructions (or ideally a Blueprint) CI: unit tests and e2e tests
- Loading branch information