2

How should one proceed if one needs to implement Disqus through the Universal Code option on a website with Content Security Policy (CSP) enabled, e.g. a static website built with Hexo?

According to Mozilla's MDN web docs:

Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks.

Because CSP blocks any sort of script tags within HTML files, leaving scripts only to .js files, the suggested implementation of Disqus for Universal Code is not an option.

For example, fontawesome provides specific implementation details of its service for CSP-enabled websites, as can be found here.

Thank you all in advance!

Gabriel H. Nunes
  • 735
  • 8
  • 20

0 Answers0