Skip to content

Instantly share code, notes, and snippets.

@matt212
Created August 2, 2022 12:13
Show Gist options
  • Save matt212/a92fb309293d7843a82d9e8b47b1f88c to your computer and use it in GitHub Desktop.
Save matt212/a92fb309293d7843a82d9e8b47b1f88c to your computer and use it in GitHub Desktop.
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