I redirect all of the requests to HTTPS with this snippet:
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
return 301 https://$host$request_uri;
}
The problem is that I can not send a POST request to my server thru Nginx because it redirects to a GET request.
I use NodeJS and Express.