"feat: 增加助手应用配置管理功能与服务器守护进程支持"

This commit is contained in:
2025-04-27 00:35:44 +08:00
parent bcc12209e0
commit f2abfbf17c
27 changed files with 658 additions and 102 deletions

View File

@@ -11,6 +11,10 @@ export const proxyRoute = async (req: http.IncomingMessage, res: http.ServerResp
const appDir = assistantConfig.configPath?.pageDir;
const url = new URL(req.url, 'http://localhost');
const pathname = url.pathname;
if (pathname === '/' && _assistantConfig?.home) {
res.writeHead(302, { Location: `${_assistantConfig?.home}/` });
return res.end();
}
if (pathname.startsWith('/favicon.ico')) {
res.statusCode = 404;
res.end('Not Found Favicon');