diff --git a/src/module/index.ts b/src/module/index.ts index 27f9472..e1af253 100644 --- a/src/module/index.ts +++ b/src/module/index.ts @@ -76,6 +76,11 @@ export const handleRequest = async (req: http.IncomingMessage, res: http.ServerR return res.end(); } const [_, _user, _app] = urls; + if (_app && urls.length === 3) { + // 重定向到 + res.writeHead(302, { Location: `${url}/` }); + return res.end(); + } if (!_user || !_app) { res.write('Invalid URL\n'); return res.end();