From b84f41cc31da3e8ca8ce4efb457b11b0ab09247f Mon Sep 17 00:00:00 2001 From: "LUOJIE\\coolp" Date: Fri, 27 Feb 2026 10:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87url=E4=B8=AD=E6=90=BA?= =?UTF-8?q?=E5=B8=A6=E7=9A=84=E5=8F=82=E6=95=B0=E6=9D=A5=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/app/components/base/iframe-postmessage.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx b/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx index abc97e7d..11096bf4 100644 --- a/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx +++ b/dify_1.11.1/web/app/components/base/iframe-postmessage.tsx @@ -76,11 +76,19 @@ const IframePostMessage = () => { * fetchAndStoreEmail * 调用 /console/api/account/profile 接口,获取当前用户信息, * 并将其中的 email 字段写入浏览器 Cookie。 + * 若当前页面 URL 携带 key 参数,则跳过请求与写入。 */ const fetchAndStoreEmail = async () => { try { - if (typeof window !== 'undefined' && window.parent !== window) - return + if (typeof window !== 'undefined') { + try { + const hasKeyParam = new URL(globalThis.location.href).searchParams.has('key') + if (hasKeyParam) return + } + catch { + // ignore parse error + } + } const profile = await get<{ email: string }>('/account/profile') const email = profile?.email || '' if (email) {