Vue third-party service jumps back to the application to load the page nginx report 405, POST request

problem description

the third-party service jumps back to a page in the application that cannot be loaded. Nginx reported 405

the environmental background of the problems and what methods you have tried

  • problem environment:
The
server is in the nginx environment

when calling the foreign h5 payment service, the third-party service will receive our payment status page address for the user to complete the payment and jump back to the application.
  • attempted method

nginx configuration

location //  {
    root /data/wwwroot/html;
    try_files $url $url/ //index.html;
    error_page 405 = 200 $url;
}

configure the nginx configuration above, it is possible to jump to the page normally
, but this method is a bit too rough, it cannot be changed to 200

for all 405 errors.

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?

  • can explain why a Vue request to load a page cannot be a POST request.
  • are there any other solutions besides the above nginx configuration?
Menu