-
Notifications
You must be signed in to change notification settings - Fork 12
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
Does not work with proper CSP settings #153
Comments
@heinerlamprecht Hi! Sorry for the late response. This can be used with CSP via pre-compiling, as mentioned in the documentation: https://github.com/ExodusMovement/schemasafe#generate-modules To do this, the schemas should be known prior to runtime, and pre-built. |
Ah, I see. Are the schemas trusted or not? Using untrusted schemas could cause DoS even with all the checks, regardless of the validator used. |
How can I use this compiled module in an application? |
I'm not sure about the nature of the question, that depends on the exact setup. |
After applying proper CSP-settings, the validator does not work anymore. Console shows:
EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script
Unfortunately, "unsafe-eval" is prohibited in lots of governmental organisations or Top-500 companies.
Note: The application connects to a REST-Service and the schemas are not known at build-time. Instead they are downloaded from the REST-API.
The text was updated successfully, but these errors were encountered: