Skip to content

Commit 089dbbb

Browse files
committed
fix: 修复admin socketio平台链接协议问题
1 parent 9b7499a commit 089dbbb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/admin/app/ra/routes/socketio.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ import { Card, CardContent } from '@mui/material';
66
* SocketIO 管理
77
*/
88
export const SocketIOAdmin: React.FC = React.memo(() => {
9+
const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
10+
911
return (
1012
<Box p={4}>
1113
<Card>
1214
<CardContent>
1315
<Typography component="div">
14-
服务器URL为: <strong>ws://{window.location.host}</strong>
16+
服务器URL为:{' '}
17+
<strong>
18+
{protocol}://{window.location.host}
19+
</strong>
1520
</Typography>
1621
<Typography component="div">
1722
账号密码为Tailchat后台的账号密码

0 commit comments

Comments
 (0)