For cross-domain problems, please consult No 'Access-Control-Allow-Origin' header is present..

Aug.11,2021

confirm whether cross-domain access is allowed on the server side. "Access-Control-Allow-Origin" indicates that cross-domain access is allowed, and whether the server side allows cross-domain access to the source. The server side is not set up, and the front end cannot allow cross-domain access


the back end does not add cross-domain header. The translation is very clear. There is no response header in the source (file)

.

if you use nginx, you can support cross-domain by modifying nginx.conf configuration

http {
  ......
  add_header Access-Control-Allow-Origin *;
  add_header Access-Control-Allow-Headers X-Requested-With;
  add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
  ......
}

take a look at the http request message to see the domain names and request types allowed by the server, and add

to the server accordingly.
Access-Control-Allow-Origin [];
Access-Control-Allow-Headers X-Requested-With;
Access-Control-Allow-Methods [GET,POST,OPTIONS];
Menu