update
This commit is contained in:
@@ -14,23 +14,28 @@ module.exports = defineConfig({
|
||||
|
||||
'/api': {
|
||||
//后端接口的baseurl
|
||||
target: 'https://open.tophub.today',
|
||||
target: 'http://localhost:8080',
|
||||
//是否允许跨域
|
||||
changeOrigin: true,
|
||||
// ws: true, //是否代理 websockets
|
||||
// secure: true,
|
||||
// 'secure': true,
|
||||
headers: {
|
||||
Connection: "kepp-alive"
|
||||
Connection: "kepp-alive",
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
"Content-Type": "application/json;charset=utf-8"
|
||||
},
|
||||
pathRewrite: {
|
||||
//这里的作用是使用去掉api
|
||||
'^/api': ''
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
'/dev': {
|
||||
//后端接口的baseurl
|
||||
target: 'http://localhost:8080',
|
||||
target: 'https://open.tophub.today',
|
||||
//是否允许跨域
|
||||
changeOrigin: true,
|
||||
// ws: true, //是否代理 websockets
|
||||
|
Reference in New Issue
Block a user