问题
- 1.接口请求后台,发现post方法被重定向为get
- 2.使用的宝塔,在nginx配置文件里面改为
proxy_pass
没生效
解决办法
在伪静态里面改
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c14eccba66a3c50348180e8c6aed278b.png)
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
if ($request_method ~ ^(POST|DELETE|OPTIONS)$) {
proxy_pass https://$host$1;
break;
}
rewrite ^(/.*)$ https://$host$1 permanent;
}