diff --git a/src/modules/fm-manager/proxy/ai-proxy.ts b/src/modules/fm-manager/proxy/ai-proxy.ts index f8ae0e2..9999647 100644 --- a/src/modules/fm-manager/proxy/ai-proxy.ts +++ b/src/modules/fm-manager/proxy/ai-proxy.ts @@ -68,12 +68,20 @@ const getAiProxy = async (req: IncomingMessage, res: ServerResponse, opts: Proxy const password = params.get('p'); const hash = params.get('hash'); let dir = !!params.get('dir'); + const edit = !!params.get('edit'); const recursive = !!params.get('recursive'); const showStat = !!params.get('stat'); const { objectName, app, owner, loginUser, isOwner } = await getObjectName(req); if (!dir && _u.pathname.endsWith('/')) { dir = true; // 如果是目录请求,强制设置为true } + if (edit) { + // 重定向root/codepod/#folder=路径 + const redirectUrl = `/root/codepod/#folder=${_u.pathname}`; + res.writeHead(302, { Location: redirectUrl }); + res.end(); + return true; + } logger.debug(`proxy request: ${objectName}`, dir); try { if (dir) {