Loading

Quipoin Menu

Learn • Practice • Grow

express-js / Express.js Security Practices
mcq
Direction: Choose the correct option

Q1.

What is the purpose of helmet.js in Express?
A. To enable CORS
B. To parse cookies
C. To secure HTTP headers by setting various security-related headers
D. To compress responses
Direction: Choose the correct option

Q2.

Why should you use HTTPS in production?
A. To enable cookies
B. To increase speed
C. To improve SEO
D. To encrypt data between client and server
Direction: Choose the correct option

Q3.

What is SQL injection?
A. A type of database
B. A way to backup databases
C. An attack where malicious SQL code is inserted into a query
D. A method to optimize SQL queries
Direction: Choose the correct option

Q4.

How can you prevent SQL injection when using raw SQL?
A. Use parameterized queries or prepared statements
B. Disable SQL
C. Use ORM only
D. Escape user input manually
Direction: Choose the correct option

Q5.

What is Cross-Site Scripting (XSS)?
A. A server-side vulnerability
B. An attack where malicious scripts are injected into trusted websites
C. A method to steal cookies
D. A type of authentication