When a cross-origin request is "complex" (uses methods other than GET/HEAD/POST,
has custom headers, or uses certain Content-Types), the browser automatically sends
a preflight OPTIONS request first.
The preflight checks if the actual request is allowed. Only if the server responds with the right CORS headers will the browser send the real request.