How To Secure Your Django Application with a Content Security Policy
Websites use various services, styles, scripts, and images to load and render content, and the browser will execute all of it. Using a Content Security Policy (CSP) can help ensure that users are protected from malicious code. In this tutorial, you’ll implement a CSP in a basic Django app, customizing the CSP to allow certain domains and inline resources to run. You’ll also set up Sentry to log violations.