Browser access interface 200, remote call 500 error, how to solve?

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)

what result do you expect? What is the error message actually seen?


should be caused by cross-domain


remote call error. Posting 500is a server error.


is the listening port number less than 1024? Access to the reserved port is then restricted by the firewall


it is best to see if there are any errors on the server. 500 is an internal error on the server

Menu