feat(aiot-device): 新增摄像头代理 Vite 规则
WVP 的摄像头拉流代理接口位于 /api/proxy 路径下, 与 ROI/算法接口的 /api/ai 前缀不同,需单独匹配。 新增 /admin-api/aiot/device/proxy → /api/proxy 代理规则。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,14 @@ export default defineConfig(async () => {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
target: 'http://127.0.0.1:8000',
|
target: 'http://127.0.0.1:8000',
|
||||||
},
|
},
|
||||||
|
// aiot/device/proxy -> WVP :18080(rewrite: /admin-api/aiot/device/proxy -> /api/proxy)
|
||||||
|
// 摄像头拉流代理接口在 /api/proxy 下,需单独匹配
|
||||||
|
'/admin-api/aiot/device/proxy': {
|
||||||
|
changeOrigin: true,
|
||||||
|
target: 'http://127.0.0.1:18080',
|
||||||
|
rewrite: (path: string) =>
|
||||||
|
path.replace('/admin-api/aiot/device/proxy', '/api/proxy'),
|
||||||
|
},
|
||||||
// aiot/device -> WVP :18080(rewrite: /admin-api/aiot/device -> /api/ai)
|
// aiot/device -> WVP :18080(rewrite: /admin-api/aiot/device -> /api/ai)
|
||||||
'/admin-api/aiot/device': {
|
'/admin-api/aiot/device': {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user