POST request turns into GET request

前端 未结 2 1692
鱼传尺愫
鱼传尺愫 2020-12-11 08:25

I have a Rails 4.1 application with nginx and unicorn. Some of POST request are turn into GET request. I gues it\'s related my nginx config. Here is the previous question ab

2条回答
  •  没有蜡笔的小新
    2020-12-11 08:54

    You may also want to try a 307 redirect. I found that my POST's were turning into GET's with the 301 redirect.

    I.e. your server block becomes:

    server {
        server_name www.my-app.com my-app.com;
        return 307 $scheme://$host$request_uri;
    }
    

提交回复
热议问题