前端 History 路由及 API 反向代理的 Nginx 配置
Jul 16, 2020 / 0 min read / 259
    
    underscores_in_headers on; 

    location ~ /prod-api {
      rewrite ^/prod-api/(.*)$ /$1 break;
      proxy_pass http://*****.com;
    }

    location /file {
        proxy_pass  http://*****.com;
    }
     location ~ / {
        try_files $uri  $uri/  /index.html;   
    }