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.
Loading...
Related Quiz
- What is the primary purpose of using WebSockets in web applications?
- Which of these is not a type of memory area in the Java Virtual Machine (JVM)?
- Using _________ instead of concatenation in loops for string manipulation enhances performance in servlets.
- A servlet receives a POST request with JSON data. What are the steps to correctly parse and use this data?
- A secure servlet session is typically identified through a unique _________.