Content Security Policy Header

5 minutes 5 Questions

The Content Security Policy (CSP) Header is a security measure to prevent Cross-Site Scripting (XSS), clickjacking, and other code injection attacks by specifying allowed sources of content for a web page. When implemented, the web server sends an HTTP response header with a policy to the browser, …

Test mode:
CompTIA Security+ - Content Security Policy Header Example Questions

Test your knowledge of Content Security Policy Header

Question 1

You are helping a company improve their website's security. You need to restrict the domains that the website can load scripts from. Which Content Security Policy header directive should you use?

Question 2

A web application has a vulnerability that allows attackers to inject scripts. Which Content Security Policy header directive should be used to mitigate the risk of script injection attacks?

Question 3

A website uses Content Security Policy and needs to allow an external domain to load images on the site while maintaining security. Which directive and value should be used?

More Content Security Policy Header questions
2 questions (total)