1.nginx配置对比

---------------------------------------------


2.postman特殊设置(postman在301情况下,会自动进行跳转,默认为自动跳转)

关闭自动跳转后


3. nginx 301分析
nginx 301情况如下
1.当location有最后一个斜杠,且proxy_pass后不带斜杠,会自动进行301跳转到带斜杠的url


2.当location有没有最后一个斜杠
-- proxy_pass最后不加/,可以正常访问


-- proxy_pass加了/,则post请求会被重定向为get请求(如果目标路由有同时监听/test/和/test,则不会重定向)















![[USACO06JAN] The Grove S](https://img-blog.csdnimg.cn/016e771327934d1285267d13a39471d4.png#pic_center)


