mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-27 14:46:06 +08:00
移除注释
This commit is contained in:
parent
ccfa6dfb70
commit
2132491195
|
@ -7,7 +7,6 @@ import jwt from 'express-jwt';
|
|||
import fs from 'fs';
|
||||
import http from 'http';
|
||||
import expressWs from 'express-ws';
|
||||
import Logger from './logger';
|
||||
|
||||
const excludePath = ['/api/login'];
|
||||
|
||||
|
@ -37,28 +36,7 @@ export default ({ app }: { app: Application }) => {
|
|||
return server.listen(...args);
|
||||
};
|
||||
|
||||
const wsInstance = expressWs(app, server);
|
||||
|
||||
// server.on('upgrade', function upgrade(request, socket, head) {
|
||||
// const wss = wsInstance.getWss();
|
||||
// auth((req) => {
|
||||
// const searchParams = new URLSearchParams(
|
||||
// req.url.slice(req.url.indexOf('?')),
|
||||
// );
|
||||
// return searchParams.get('token');
|
||||
// })(request, {} as any, (err) => {
|
||||
// Logger.error(err);
|
||||
// if (err) {
|
||||
// socket.write('HTTP/1.1 401 Unauthorized\r\n\r\n');
|
||||
// socket.destroy();
|
||||
// return;
|
||||
// }
|
||||
|
||||
// wss.handleUpgrade(request, socket, head, function done(ws) {
|
||||
// wss.emit('connection', ws, request);
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
expressWs(app, server);
|
||||
|
||||
app.enable('trust proxy');
|
||||
app.use(cors());
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
import {
|
||||
useState,
|
||||
useEffect,
|
||||
useCallback,
|
||||
Key,
|
||||
useRef,
|
||||
CSSProperties,
|
||||
} from 'react';
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
import { request } from '@/utils/http';
|
||||
|
@ -19,7 +12,6 @@ const TerminalApp = () => {
|
|||
const [width, setWdith] = useState('100%');
|
||||
const [marginLeft, setMarginLeft] = useState(0);
|
||||
const [marginTop, setMarginTop] = useState(-72);
|
||||
const [style, setStyle] = useState<CSSProperties | undefined>(undefined);
|
||||
|
||||
const ref = useRef<HTMLElement>(null);
|
||||
|
||||
|
@ -76,7 +68,7 @@ const TerminalApp = () => {
|
|||
},
|
||||
}}
|
||||
>
|
||||
<div ref={ref} style={style}></div>
|
||||
<div ref={ref}></div>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user