版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_28883885/article/details/82346705
vue的请求规则
proxyTable: {
'/api':{
// 拦截请求规则
target:'http://localhost:9999',
changeOrigin:true,
pathRewrite:{
'/api':''
}
}
}
nginx的请求规则
location /api {
proxy_pass http://localhost:9999/;
}