# CSP: Content Security Policy

> What is Content Security Policy (CSP), and how does it reduce the impact of XSS? How would you deploy a strict CSP on a real site?

Canonical: https://www.internhack.in/learn/interview/web-security/security-content-security-policy
Last updated: 2026-11-28

Difficulty: Advanced

## Question

What is Content Security Policy (CSP), and how does it reduce the impact of XSS? How would you deploy a strict CSP on a real site?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Content Security Policy, XSS, Nonce-based CSP, strict-dynamic, Trusted Types, Security Headers

Previous: [Zero Trust](https://www.internhack.in/learn/interview/web-security/security-zero-trust-architecture) · Next: [Subresource Integrity (SRI)](https://www.internhack.in/learn/interview/web-security/security-subresource-integrity) · [All of Web Security (OWASP, JWT, XSS, CSRF)](https://www.internhack.in/learn/interview/web-security)

## More Web Security (OWASP, JWT, XSS, CSRF) questions

- [Same-Origin Policy (SOP)](https://www.internhack.in/learn/interview/web-security/security-same-origin-policy)
- [Brute Force Protection](https://www.internhack.in/learn/interview/web-security/security-brute-force-vulnerability)
- [CSPRNG](https://www.internhack.in/learn/interview/web-security/security-cryptographically-secure-random)
- [Data at Rest](https://www.internhack.in/learn/interview/web-security/security-sensitive-data-rest)
- [Security Misconfiguration](https://www.internhack.in/learn/interview/web-security/security-security-misconfiguration)
- [Phishing Protection](https://www.internhack.in/learn/interview/web-security/security-phishing-prevention)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Web Security (OWASP, JWT, XSS, CSRF)](https://www.internhack.in/learn/interview/web-security)
