nigix deployment of static resources failed to read resource data with 405

Hybrid development: The product prototype is a three-level linkage of prefecture-level cities, and the h5 aspect is json static data

Problem: json data can be accessed on tomcat

put on nigix failed

Solution: change ajax request post to get


Given a json request, the result of the post request in the HTTP interface test tool returns a 405 status, and the get request returns data. After searching, I found that 405 is returned because most web servers such as Apache, IIS, and Nginx do not allow static files to respond to POST requests.

I have tried several methods on the Internet. The following one works. Convert the POST request received by the static file to the GET method through upstream.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325955451&siteId=291194637