开发环境配置ws代理

This commit is contained in:
bob
2025-03-13 21:38:52 +08:00
parent 31addeb187
commit 1341734375

View File

@@ -21,6 +21,11 @@ export default defineConfig({
target: 'http://localhost:8080', // 后台服务器的源
changeOrigin: true // 修改源
},
'/ws': {
// 获取请求中带 /api 的请求
target: 'ws://localhost:8080', // 后台服务器的源
changeOrigin: true // 修改源
},
'/oss/': {
// 获取图片的请求
target: 'https://bk0528.oss-cn-beijing.aliyuncs.com', // 对象存储oss的源