No one answered once before, probably because the description of the question is not very detailed
configure the nginx server as follows:
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Headers "Cookie,Set-Cookie,token,x-requested-with,content-type,withcredentials";
add_header "Access-Control-Allow-Methods" "GET,POST,OPTIONS,DELETE,PUT";
add_header "Access-Control-Allow-Credentials" "true";
ajax is also configured with withCredentials = true
back-end API verification data if verification fails, return httpCode is 405
if no login or login expires, the httpCode returned is 401
but the problem of forbidding cross-domain access occurs when httpcode is not accessed by 200API!
is there any way to solve the problem that any status code is returned by the server?