This commit is contained in:
2026-01-09 13:04:48 +08:00
parent 25a98886d2
commit 59c7eb57fa
2 changed files with 2 additions and 1 deletions

View File

@@ -1,6 +1,5 @@
export * from './proxy/http-proxy.ts' export * from './proxy/http-proxy.ts'
export * from './proxy/file-proxy.ts' export * from './proxy/file-proxy.ts'
export * from './proxy/minio-proxy.ts'
export * from './proxy/ai-proxy.ts' export * from './proxy/ai-proxy.ts'
export * from './get-router.ts' export * from './get-router.ts'

View File

@@ -304,6 +304,8 @@ export const handleRequest = async (req: http.IncomingMessage, res: http.ServerR
let appFile = await userApp.getFile(appFileUrl); let appFile = await userApp.getFile(appFileUrl);
if (!appFile && url.endsWith('/')) { if (!appFile && url.endsWith('/')) {
appFile = await userApp.getFile(appFileUrl + 'index.html'); appFile = await userApp.getFile(appFileUrl + 'index.html');
} else if (!appFile && !url.endsWith('/')) {
appFile = await userApp.getFile(appFileUrl + '.html');
} }
if (isExist.proxy) { if (isExist.proxy) {
let proxyUrl = appFile || isExist.indexFilePath; let proxyUrl = appFile || isExist.indexFilePath;