405重定向,然后把POST转GET
upstream local {
    server 10.0.1.11:81;
}
server {
    listen 81;
    server_name testf.xxx.com;
    location / {
        root /data/f/ROOT/;
        index index.html index.htm;
    # 解决vue history模式,刷新404问题。
	try_files $uri $uri/ /index.html;
    }
    error_page 405 =200 @405;
    location @405 {
        root /data/f/ROOT/;
        proxy_method GET;
        proxy_pass http://local/$request_uri;
    }
    location /cashloan/ {
       proxy_pass https://testapicashloan.xxx.com;
    }
    location /front/ {
       proxy_pass https://testapifront.xxx.com;
    }
    access_log  /app/logs/f_access.log  main;
}
server {
    listen 80;
    server_name testf.xxx.com;
    location / {
      rewrite ^(.*) https://$server_name$1 permanent;
    }
}
 
                     
                    
                 
                    
                 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号