Skip to content

Commit

Permalink
fix: 修复admin socketio平台链接协议问题
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Feb 1, 2023
1 parent 9b7499a commit 089dbbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/admin/app/ra/routes/socketio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ import { Card, CardContent } from '@mui/material';
* SocketIO 管理
*/
export const SocketIOAdmin: React.FC = React.memo(() => {
const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws';

return (
<Box p={4}>
<Card>
<CardContent>
<Typography component="div">
服务器URL为: <strong>ws://{window.location.host}</strong>
服务器URL为:{' '}
<strong>
{protocol}://{window.location.host}
</strong>
</Typography>
<Typography component="div">
账号密码为Tailchat后台的账号密码
Expand Down

0 comments on commit 089dbbb

Please sign in to comment.