-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Description
Is your enhancement related to a problem? Please describe.
Yaml language server currently uses ajv.compile for schema validation here: https://github.com/redhat-developer/yaml-language-server/blob/main/src/languageservice/services/yamlSchemaService.ts#L41 . This works fine, except for the cases, when unsafe-eval is disabled by CSP. This makes the language server unusable in this context. There are also a few discussions about that for ajv (for example ajv-validator/ajv#406).
Describe the solution you would like
AJV supports standalone mode https://ajv.js.org/standalone.html where a validation function is generated at compile time and doesn't rely on dynamic compilation anymore. I propose to switch the language server to use the standalone mode which would allow the server to work with strict CSP policies.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels