From 08884b7e4b94155e50f1cc3a501bdc2488dd21db Mon Sep 17 00:00:00 2001 From: xiongxiao Date: Wed, 18 Mar 2026 16:54:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E6=94=AF=E6=8C=81=EF=BC=8C=E9=87=8D=E5=AE=9A?= =?UTF-8?q?=E5=90=91=E5=88=B0=E6=8C=87=E5=AE=9A=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/fm-manager/proxy/ai-proxy.ts | 8 ++++++++ 1 file changed, 8 insertions(+) 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) {