Skip to content

Getting "Refused to load the script" when try to load comments. #381

Answered by tszhong0411
mdrathik asked this question in Q&A
Discussion options

You must be logged in to vote

I solved it like this and this works. But I don't know if this is the right way to do it.

const ContentSecurityPolicy = `
  default-src 'self';
  script-src 'self' 'unsafe-eval' 'unsafe-inline' giscus.app scripts.simpleanalyticscdn.com www.googletagmanager.com utteranc.es;
  style-src 'self' 'unsafe-inline' *.googleapis.com cdn.jsdelivr.net;
  img-src * blob: data:;
  media-src 'none';
  connect-src *;
  font-src 'self' fonts.gstatic.com cdn.jsdelivr.net;
  frame-src giscus.app
`;

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@AlexanderZeilmann
Comment options

Answer selected by mdrathik
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants