修改:默认后端代理接口
This commit is contained in:
parent
f8cebe64b3
commit
10b271e3d8
@ -37,7 +37,7 @@ export default defineConfig({
|
||||
host: true,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:7777', // 测试服务器地址,可根据实际后端地址修改
|
||||
target: 'http://localhost:8888', // 测试服务器地址,可根据实际后端地址修改
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''), // 如果后端接口本身没有 /api 前缀,需要将其重写掉
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user