What is CORS, and why does Postman reach the API while the browser reports a CORS error?
Short answer
CORS is a browser rule: JS on site A may only read server B's response if B allows it with Access-Control-Allow-Origin. Postman isn't blocked, so CORS doesn't protect your API.
3 points to say:
- The request still reaches the server.
- Complex requests send an
OPTIONSpreflight first. - Real protection is authentication and authorization.
Keep reading the deep dive
Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.