proxyTable: {
"/api":{
target: 'https://app.hsltm.com',
changeOrigin: true,
pathRewrite: {
'^/api': '/api'
}
},
'/ssm-api': {
target: 'https://appdb.hsltm.com',
changeOrigin: true,
pathRewrite: {
'^/ssm-api': '/ssm-api'
}
},
'/api-web': {
target: 'https://appdb.hsltm.com',
changeOrigin: true,
pathRewrite: {
'^/api-web': '/api-web'
}
}
},
上面是我配置的proxyTable
-----------------------
'/api-web': {
target: 'https://appdb.hsltm.com',
changeOrigin: true,
pathRewrite: {
'^/api-web': '/api-web'
}
}
使用第三个的时候请求是404
-------------------------
"/api":{
target: 'https://app.hsltm.com',
changeOrigin: true,
pathRewrite: {
'^/api': '/api'
}
},
我吧第一个我配置的注释了之后就第三个就可以请求了
--------------------------------------
这不就是冲突了嘛,都是/api开头,这里了解一下: https://vuejs-templates.githu...