You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
Compiling the AJV schema validation functions at runtime uses new new Function which requires the CSP script-src to include 'unsafe-eval'.
Instead, the schema validation functions should be pre-compiled.
Steps to Reproduce
Use the cloudevents/sdk-javascript library in a site with a CSP with script-src not including 'unsafe-eval'
Use new CloudEvent(...)
Observe CSP error
Expected Behavior
The library should be able to be used successfully without including 'unsafe-eval' in your CSP.