What does a Content-Security-Policy do?
A CSP is a response header that tells the browser which sources a page may load scripts, styles, images, frames and other content from. If an attacker manages to inject a script, a strict policy stops the browser from running it, which makes CSP one of the strongest defenses against cross-site scripting.