Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.
Why they ask this: An open-ended classic that shows how broad your understanding of the web is.
Answer
https), host and path.GET /jobs with headers and cookies.Go deeper on whichever part matches the role you are applying for.
Why they ask this: Every frontend developer meets CORS errors when calling an API on another domain.
Answer
Browsers enforce the same-origin policy: JavaScript on https://app.example.com cannot read responses from a different origin (scheme + host + port), such as https://api.example.com, unless that server allows it.
CORS (Cross-Origin Resource Sharing) is how the server grants permission, using response headers such as:
Access-Control-Allow-Origin: https://app.example.com
Access-Control-Allow-Methods: GET, POST, PATCH, DELETE
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: trueFor non-simple requests (for example JSON bodies or an Authorization header) the browser first sends a preflight OPTIONS request.
Fix it on the server, not in the frontend: in Laravel, set allowed_origins in config/cors.php. Avoid * when cookies or credentials are involved; browsers reject that combination anyway. CORS is enforced by browsers only; Postman and server-to-server calls ignore it.