In my case, I was sending a POST
request over HTTP
to a server where I had set up Nginx
to redirect all requests to port 80
to port 443
where I was serving the app over HTTPS
.
Making the request to the correct port directly fixed the problem. In my case, all I had to do is replace http://
in the request URL to https://
since I was using the default ports 80
and 443
respectively.