How does a Content Security Policy (CSP) help in preventing XSS attacks?

  • It allows only inline scripts
  • It encrypts the communication
  • It filters HTTP headers
  • It restricts the sources of content
A Content Security Policy (CSP) helps prevent XSS attacks by restricting the sources of content, reducing the risk of malicious script execution from unauthorized sources.
Add your answer
Loading...

Leave a comment

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