nginx 转发post请求变成get请求

 server {
        listen       80;
        server_name  ******;
        if ($request_method = POST) {
        return 307 https://$host$request_uri;
        }
        rewrite ^(.*)$ https://$host$1 ;
        location / {
            root   html;
            index  index.html index.htm;
        }
    }

返回307即可

猜你喜欢

转载自blog.csdn.net/XiaoXiao_Lin/article/details/121922850