server {
listen 80;
server_name ******;
if ($request_method = POST) {
return 307 https://$host$request_uri;
}
rewrite ^(.*)$ https://$host$1 ;
location / {
root html;
index index.html index.htm;
}
}
返回307即可