Sikta RoyKnowledge Contributor
How does a Content Security Policy (CSP) enhance security, and what are its typical directives?
How does a Content Security Policy (CSP) enhance security, and what are its typical directives?
CSP helps mitigate XSS and data injection risks by specifying which content sources are trusted, thus preventing the loading of unauthorized or harmful resources. Typical directives include default-src, script-src, and style-src to control the sources of scripts, stylesheets, and other content.