This commit is contained in:
2023-12-22 22:57:37 +08:00
parent e8e402cf4d
commit d20dea0944
21 changed files with 2413 additions and 145 deletions

View File

@@ -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