MCQ Hive stays free thanks to ads. Please disable your ad blocker for this site so content and features keep working.
Web Development
Web Security
Beginner
Q
Does a correct CORS configuration protect an API from being called by scripts or tools such as curl?
AYes, but only for POST requests
BNo; CORS only controls which web origins a browser lets read the responses. Server-side authentication is still required
CCORS encrypts API traffic
DYes, it blocks all unauthorized clients
Correct Answer:
B. No; CORS only controls which web origins a browser lets read the responses. Server-side authentication is still required
Explanation:
CORS is a browser-enforced relaxation of the same-origin policy, not an access control mechanism.
ALSO KNOW (related points):
• Which statement about sessions is correct? → Session data is stored on the server; the client usually keeps only a session ID in a cookie