CORS controls whether browser JavaScript may access resources across origins. In an n-tier system, a separately deployed frontend and backend require explicit backend permission because of the same-origin policy. section 6.1
Interview scenario
A UI at https://ui.myapp.com calls an API at https://api.myapp.com. Configure the API to allow that origin, required methods and headers, and credentials; verify the OPTIONS response with curl. A React + Vite development proxy can alternatively route a request such as /apiproxy/api/breeds/image/random to the target API. section 6.1







