服务器挂证书 部分url强制https ,现在在nginx下post提交数据会丢失
location ^~ /v1/getPolicyNo/ {
if ($scheme = http) {
return 301 https://$host$request_uri;
}
proxy_pass http://locationtomcat; #不要这句提示一直重定向,加上正常https但是post提交数据丢失
}
location / {
proxy_redirect off;
proxy_connect_timeout 20;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 900m;
proxy_pass http://locationTomcat;
}