diff --git a/inventory-web/vite.config.ts b/inventory-web/vite.config.ts index 76052f0..99bf25e 100644 --- a/inventory-web/vite.config.ts +++ b/inventory-web/vite.config.ts @@ -18,6 +18,10 @@ export default defineConfig({ host: '0.0.0.0', port: 5173, https: true, // ★ [新增] 强制开启 HTTPS,否则浏览器会拦截摄像头 + hmr: { + protocol: 'wss', + clientPort: 5173 + }, proxy: { // 拦截所有以 /api 开头的请求 '/api': {