remove log

This commit is contained in:
2025-11-24 18:33:25 +08:00
parent 76800e3a97
commit 2fb1fd429f
3 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@kevisual/local-proxy",
"version": "0.0.6",
"version": "0.0.8",
"description": "",
"main": "index.ts",
"scripts": {

View File

@@ -23,7 +23,7 @@ export const proxyRoute = async (req: http.IncomingMessage, res: http.ServerResp
return;
}
if (pathname.startsWith('/client') || pathname.startsWith('/api') || pathname.startsWith('/v1') || pathname.startsWith('/serve')) {
console.debug('handle by router');
// console.debug('handle by router');
return;
}
const localProxyProxyList = localProxy.getLocalProxyList();

View File

@@ -24,11 +24,15 @@ export const fileProxy = (req: http.IncomingMessage, res: http.ServerResponse, p
filePath = path.join(rootPath, target, pathname);
exist = checkFileExists(filePath, true);
}
if (!exist) {
filePath = path.join(rootPath, target, pathname, 'index.html');
exist = checkFileExists(filePath, true);
}
if (!exist) {
filePath = path.join(rootPath, target, indexPath);
exist = checkFileExists(filePath, true);
}
log.debug('filePath', { filePath, exist });
// log.debug('filePath', { filePath, exist });
if (!exist) {
res.statusCode = 404;