Browser & Web Performance · Junior · Question 56 of 75
A frontend on https://app.com calls https://api.com and sees a CORS error. Where is the fix usually needed?
- 1In the frontend: add
mode: "no-cors"to read the response - ✓Correct answer: On
api.com: it must return the rightAccess-Control-Allow-*headers - 3In the browser settings of every user
Explanation
no-cors gives an opaque response that script can't read. The API (or a proxy in front of it) must allow the origin.