Wait what
The main premise of this post is false.
The mentioned request can’t succeed without first completing a preflight check.
The main premise of this post is false.
The mentioned request can’t succeed without first completing a preflight check.
Read about 'simple' requests to see what you can and cannot do before a preflight is required: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simpl...
Put simply if I make cross origin POST request that’s JSON type it cannot be a simple request.
There are no ways around this
It doesn’t seem the author was aware of content type once you see their solution.
Normally I would give the benefit of the doubt, but the “fix” is pretty damming here.