设置了 http强转https
return 301 https://$server_name$request_uri;
结果post请求被301为get
172.16.0.56; -; -; [25/Jul/2020:17:12:38 +0800]; "POST /smyFile/v1/upload HTTP/1.1"; 301; 166; "-"; "PostmanRuntime/7.26.2"; -; 10.16.55.168; -; -; 0.050;
10.16.13.92; -; -; [25/Jul/2020:17:12:38 +0800]; "GET /smyFile/v1/upload HTTP/1.1"; 200; 50; "http://10.16.55.177/smyFile/v1/upload"; "PostmanRuntime/7.26.2"; 223.198.116.142; 10.16.55.168; 10.16.55.178:18010; 0.008; 0.008;
openresty 301 post get
谁遇到过吗
- Edited
POST方法是非幂等的,所以跳转的时候通常会被转为GET方法。
如果希望跳转后保持POST方法,可以使用307跳转。