Which HTTP method is used by browsers to send a CORS preflight request before the actual request?
Think about a method that checks permissions without sending data.
Browsers use the OPTIONS method to send a preflight request to check if the actual request is safe to send.
What will be the value of the Access-Control-Allow-Origin header in the response if the server sets it to *?
GET /api/data HTTP/1.1
Host: example.com
Origin: https://client.com
Response Headers:
Access-Control-Allow-Origin: *Consider what the wildcard * means in CORS headers.
The * value means the server allows requests from any origin.
Which Postman test script correctly asserts that the Access-Control-Allow-Origin header equals https://client.com?
Look for the correct way to get a header and compare its value in Postman tests.
Option B correctly retrieves the header value and asserts equality using pm.expect.
You send a request from Postman to a server and receive a 200 OK response, but your browser shows a CORS error. Why does this happen?
Think about how Postman and browsers handle CORS differently.
Postman is a testing tool and does not enforce CORS restrictions, but browsers enforce CORS for security.
Which approach best automates testing that a server correctly handles CORS preflight requests in a Postman collection?
Remember how browsers perform preflight checks and what headers are involved.
Preflight requests use OPTIONS method with Origin header; tests should verify Access-Control-Allow headers in response.