Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
config
contentSecurityPolicy: {
directives: {
defaultSrc: ["'self'"],
scriptSrc: ["'self'","https://cdnjs.cloudflare.com/","https://code.highcharts.com/","'unsafe-inline'"],
styleSrc: ["'self'", 'https://fonts.googleapis.com', "'unsafe-inline'"],
imgSrc: ["'self'", 'https://*.com'],
fontSrc: ["'self'", 'https://*.com', 'data:']
},
error
Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src-attr 'none'".
cdn
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment