forked from github/dataease
Merge pull request #10881 from dataease/pr@dev-v2@fix_dynamic_path_cas
fix(X-Pack): 配置动态url前缀的场景下无法进行cas/oidc认证
This commit is contained in:
commit
9e914b2b1b
@ -21,13 +21,21 @@ export const logoutHandler = (justClean?: boolean) => {
|
|||||||
if (router.currentRoute.value.fullPath) {
|
if (router.currentRoute.value.fullPath) {
|
||||||
queryRedirectPath = router.currentRoute.value.fullPath as string
|
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') {
|
if (wsCache.get('out_auth_platform') === 'cas') {
|
||||||
const uri = window.location.href
|
const uri = window.location.href
|
||||||
window.location.href = '/casbi/cas/logout?service=' + uri
|
window.location.href = pathname + '/casbi/cas/logout?service=' + uri
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (wsCache.get('out_auth_platform') === 'oidc') {
|
if (wsCache.get('out_auth_platform') === 'oidc') {
|
||||||
window.location.href = '/oidcbi/oidc/logout'
|
window.location.href = pathname + '/oidcbi/oidc/logout'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (wsCache.get('custom_auth_logout_url')) {
|
if (wsCache.get('custom_auth_logout_url')) {
|
||||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit f0fde70871bc17a8e3660c7c8563418e87cc8b87
|
Subproject commit d21daef323ca920d8f2ca467b5a69f018d30384b
|
Loading…
Reference in New Issue
Block a user