There is an options request before the axios post request, and a cross-domain error is reported. What is the reason for this? How do you need to do it?

clipboard.png

clipboard.png

clipboard.png

what is this options request for?
now it is in this options that there is a cross-domain error
and then there is no post request

.

normally, there is an options request followed by a post request

Mar.22,2021

  1. first divides into simple requests and non-simple requests. Non-simple requests will send OPTIONS requests for pre-checking before.
  2. The
  3. backend does not allow cross-domain, so according to the same origin policy, the post request does not need to be sent.

need to add the header on your error message at the back end.

Menu