Even if AI writes more code, I still want to stay close to code by reading it, understanding it, and solving the problems hidden inside it. If AI helps me see code more clearly, then I still want development to remain part of my everyday life.
daily quiz • weekday themes • archive
One question a day, generated automatically and added to a growing archive.
🗓️ Web Security • 🟡 intermediate • 🏷️ Web Security CSP XSS Security • 📅 20260902
💡 Show Answer
A Content Security Policy (CSP) is a security feature that helps prevent cross-site scripting (XSS) attacks by specifying which sources of content are allowed to be executed within a web page.
It does this by defining a set of allowed sources for scripts, stylesheets, and other types of content.
For example, a CSP might specify that only scripts from the same origin as the web page are allowed to be executed.
This can help prevent an attacker from injecting malicious scripts into a web page.
CSP is typically implemented using a header in the HTTP response that specifies the allowed sources of content.
For example:
Content-Security-Policy: script-src 'self';
See every previous question in the quiz archive.




