Skip to content

Commit 17476d0

Browse files
committed
chore: update environment settings and import dependencies
- Cleared VITE_WS_URL in .env.development to allow dynamic WebSocket URL resolution. - Added crypto module import in Console component for potential future use.
1 parent 6cbf4e4 commit 17476d0

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.env.development

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ VITE_DEV_SERVER_PORT=8000
22
VITE_API_PROXY_TARGET=http://localhost:9527
33
# Netty WebSocket 端口(与后端 application.yml websocket.netty.port 一致;/api/ws 会 rewrite 到 /ws)
44
VITE_WS_PROXY_TARGET=http://localhost:8891
5-
# 通过前端开发服务器:/api/ws 由 vite 转发到 Netty,其余 /api 仍走 Spring
6-
VITE_WS_URL=ws://localhost:8000/api/ws/syndra
5+
# 留空:前端 resolveWebSocketUrl 会用 window.location.host 拼出 ws://localhost:8000/api/ws/syndra
6+
# 浏览器对 8000 端口的 ws 升级请求由 vite dev server 的 /api/ws 代理(见 vite.config.ts)转发到 Netty 8891
7+
VITE_WS_URL=
78
VITE_ENABLE_MONITOR_CONSOLE=true

src/components/Console/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { CloseOutlined, CopyOutlined, PauseCircleOutlined, PlayCircleOutlined } from '@ant-design/icons';
22
import { App, Button, Card, Empty, Segmented, Space, Switch, Tag, Tooltip, Typography } from 'antd';
3+
import crypto from 'crypto';
34
import dayjs from 'dayjs';
45
import type React from 'react';
56
import { memo, startTransition, useCallback, useEffect, useMemo, useRef, useState } from 'react';

0 commit comments

Comments
 (0)