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
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;
}
server {
server_name www.my-app.com
return 301 $scheme://my-app.com$request_uri;
}
This unconditionally will throw a 301 to every request to www.my-app.com
If there is no other return 301
in config: Check that the form action (or ajax request) is NOT using www.my-app.com domain, but just my-app.com, so it's not rewrited.
If there are others 301 in the config (removed for the post) could be something different.