How does a CSP help in mitigating cross-site scripting (XSS) attacks?

  • By controlling user access permissions
  • By encrypting all data in transit
  • By monitoring server logs
  • By specifying which domains can load resources
A Content Security Policy (CSP) helps mitigate XSS attacks by specifying which domains can load resources on a web page. It provides a whitelist of approved sources for content, helping to prevent malicious scripts from executing from unauthorized sources, thereby enhancing security.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *