Web Security · Junior · Question 63 of 75

What is a Content Security Policy (CSP)?

Explanation

If an attacker injects a script that doesn't match the policy, the browser refuses to run it. CSP is a strong second layer against XSS.

Further reading

Problem with a question

Web Security · Junior · question 63

Test yourself

Take the Web Security · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz