someone says:
OPTIONS is always fired first if you're not sending requests to the same domain, so if you're server is not handling OPTIONS or doesn't have proper allow origin settings there, the GET/POST will never be sent.
It's not a bug, it's how CORS works. You would see the same thing if using angular/react or any other AJAX framework.
but on my Node.js server. I put my server set to open cdn. it does not work.
my Node server on port 4000,i use webpack on port 8080
whatever.it will have a OPTIONS method request .
how can i resolve it?
Thanks!


The OPTIONS request is part of the of the CORS spec. They are not happening when your request meets the requirements of a _Simple request_, please see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Simple_requests
Thanks.
Through this issues I have learned a lot
Most helpful comment
The OPTIONS request is part of the of the CORS spec. They are not happening when your request meets the requirements of a _Simple request_, please see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Simple_requests