What is the primary purpose of implementing a Content Security Policy (CSP) on a website?
- Enable cookies for third-party domains
- Enhance search engine optimization (SEO)
- Mitigate Cross-Site Scripting (XSS) attacks
- Optimize website loading speed
The primary purpose of implementing a Content Security Policy (CSP) on a website is to mitigate Cross-Site Scripting (XSS) attacks. CSP defines and enforces the security policies for web content by specifying which sources of content are allowed, thereby reducing the risk of XSS attacks by controlling where resources can be loaded from.
Loading...
Related Quiz
- A hospital's electronic record system was breached, exposing patient records. The hospital is based in the United States. Which regulation mandates that the hospital notify affected patients of the breach?
- IPsec is a suite of protocols designed to secure what type of communication?
- What is the primary purpose of a Web Application Firewall (WAF)?
- When a policy violation occurs, the CSP can be configured to send a report to a specified URI using the _______ directive.
- Which type of attack targets vulnerabilities in a website's database by inserting malicious SQL code?