This commit is contained in:
2026-01-17 14:48:49 +08:00
parent b9b4c993f4
commit 0b5a0557ee
14 changed files with 613 additions and 233 deletions

View File

@@ -1,7 +1,7 @@
import { fileProxy, httpProxy, createApiProxy, ProxyInfo, proxy } from '@/module/assistant/index.ts';
import http from 'node:http';
import { LocalProxy } from './local-proxy.ts';
import { assistantConfig, app } from '@/app.ts';
import { assistantConfig, app, simpleRouter } from '@/app.ts';
import { log, logger } from '@/module/logger.ts';
import { getToken } from '@/module/http-token.ts';
import { getTokenUserCache } from '@/routes/index.ts';
@@ -103,6 +103,10 @@ export const proxyRoute = async (req: http.IncomingMessage, res: http.ServerResp
res.end('Not Found Favicon');
return;
}
if (pathname.startsWith('/client/upload')) {
simpleRouter.parse(req, res);
return;
}
if (pathname.startsWith('/client')) {
logger.debug('handle by router', { url: req.url });
return;