From Mozilla's documentation, there are three CORS scenarios:
- Simple requests
- Preflighted request
- Request with credentials
Simple Requests
has some disadvantages, for example, when the client declares withCredentials
, even though the server refuses, the HTTP request with the cookie has been sent, which could be an attack.
The Preflighted request
is much safer, and could cover all kinds of scenarios. Why people invent Simple Requests
, even though pre-flighted requests could meet all requirements?