remove log
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/local-proxy",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.8",
|
||||
"description": "",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user