feat: update ev cli
This commit is contained in:
@@ -2,7 +2,7 @@ import { fileProxy, httpProxy, createApiProxy, wsProxy } from '@/module/assistan
|
||||
import http from 'http';
|
||||
import { LocalProxy } from './local-proxy.ts';
|
||||
import { assistantConfig, app } from '@/app.ts';
|
||||
import { log } from '@/module/logger.ts';
|
||||
import { log, logger } from '@/module/logger.ts';
|
||||
const localProxy = new LocalProxy({
|
||||
assistantConfig,
|
||||
});
|
||||
@@ -21,6 +21,7 @@ export const proxyRoute = async (req: http.IncomingMessage, res: http.ServerResp
|
||||
return;
|
||||
}
|
||||
if (pathname.startsWith('/client')) {
|
||||
logger.info('url', { url: req.url });
|
||||
console.debug('handle by router');
|
||||
return;
|
||||
}
|
||||
@@ -74,7 +75,7 @@ export const proxyRoute = async (req: http.IncomingMessage, res: http.ServerResp
|
||||
indexPath: localProxyProxy.indexPath,
|
||||
});
|
||||
}
|
||||
const creatCenterProxy = createApiProxy(_assistantConfig?.pageApi || 'https://kevisual.cn', ['/root']);
|
||||
const creatCenterProxy = createApiProxy(_assistantConfig?.pageApi || 'https://kevisual.cn', ['/root', '/' + _user]);
|
||||
const centerProxy = creatCenterProxy.find((item) => pathname.startsWith(item.path));
|
||||
if (centerProxy) {
|
||||
return httpProxy(req, res, {
|
||||
|
||||
Reference in New Issue
Block a user