Image for Content Security Policy

Content Security Policy

A Content Security Policy (CSP) is a security feature that helps protect websites from malicious attacks, like hacking or data theft. It works by telling the browser which sources (like servers or domains) are trusted to deliver content such as scripts, images, or styles. If a harmful or unauthorized source tries to run, the CSP blocks it, reducing the risk of vulnerabilities like cross-site scripting. Essentially, CSP acts as a security guardrail, ensuring only approved content loads and enhancing the safety of the website and its visitors.