From 01692d71dbf6a746ac043aca3d422869dfe6263c Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 10 Jul 2024 15:04:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20=E9=85=8D=E7=BD=AE=E5=8A=A8?= =?UTF-8?q?=E6=80=81url=E5=89=8D=E7=BC=80=E7=9A=84=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=E6=97=A0=E6=B3=95=E8=BF=9B=E8=A1=8Ccas/oid=E8=AE=A4?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/utils/logout.ts | 12 ++++++++++-- de-xpack | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/utils/logout.ts b/core/core-frontend/src/utils/logout.ts index 632a1747f6..9050024717 100644 --- a/core/core-frontend/src/utils/logout.ts +++ b/core/core-frontend/src/utils/logout.ts @@ -21,13 +21,21 @@ export const logoutHandler = (justClean?: boolean) => { if (router.currentRoute.value.fullPath) { queryRedirectPath = router.currentRoute.value.fullPath as string } + let pathname = window.location.pathname + if (pathname) { + if (pathname.includes('oidcbi/') || pathname.includes('casbi/')) { + pathname = pathname.replace('oidcbi/', '') + pathname = pathname.replace('casbi/', '') + } + pathname = pathname.substring(0, pathname.length - 1) + } if (wsCache.get('out_auth_platform') === 'cas') { const uri = window.location.href - window.location.href = '/casbi/cas/logout?service=' + uri + window.location.href = pathname + '/casbi/cas/logout?service=' + uri return } if (wsCache.get('out_auth_platform') === 'oidc') { - window.location.href = '/oidcbi/oidc/logout' + window.location.href = pathname + '/oidcbi/oidc/logout' return } if (wsCache.get('custom_auth_logout_url')) { diff --git a/de-xpack b/de-xpack index f0fde70871..d21daef323 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit f0fde70871bc17a8e3660c7c8563418e87cc8b87 +Subproject commit d21daef323ca920d8f2ca467b5a69f018d30384b