browser access interface 200, remote call 500 error, how to solve? -sharp-sharp-sharp problem description
the environmental background of the problems and what methods you have tried
I added
to nginx conf. add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
add_header Access-Control-Allow-Headers "DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization";
if ($request_method = "OPTIONS") {
return 204;
}
related codes
/ / Please paste the code text below (do not replace the code with pictures)