fix: OIDC或者CAS场景下分享出来的链接无法访问

This commit is contained in:
fit2cloud-chenyw 2024-07-22 17:39:44 +08:00
parent 9fd340474d
commit ad6d1063fb
3 changed files with 12 additions and 0 deletions

View File

@ -317,6 +317,10 @@ const formatLinkBase = () => {
const href = window.location.href const href = window.location.href
prefix = href.substring(0, href.indexOf('#') + 1) prefix = href.substring(0, href.indexOf('#') + 1)
} }
if (prefix.includes('oidcbi/') || prefix.includes('casbi/')) {
prefix = prefix.replace('oidcbi/', '')
prefix = prefix.replace('casbi/', '')
}
return prefix + SHARE_BASE return prefix + SHARE_BASE
} }

View File

@ -248,6 +248,10 @@ const formatLinkBase = () => {
const href = window.location.href const href = window.location.href
prefix = href.substring(0, href.indexOf('#') + 1) prefix = href.substring(0, href.indexOf('#') + 1)
} }
if (prefix.includes('oidcbi/') || prefix.includes('casbi/')) {
prefix = prefix.replace('oidcbi/', '')
prefix = prefix.replace('casbi/', '')
}
return prefix + SHARE_BASE return prefix + SHARE_BASE
} }
const copyTicket = async ticket => { const copyTicket = async ticket => {

View File

@ -288,6 +288,10 @@ const formatLinkBase = () => {
const href = window.location.href const href = window.location.href
prefix = href.substring(0, href.indexOf('#') + 1) prefix = href.substring(0, href.indexOf('#') + 1)
} }
if (prefix.includes('oidcbi/') || prefix.includes('casbi/')) {
prefix = prefix.replace('oidcbi/', '')
prefix = prefix.replace('casbi/', '')
}
return prefix + SHARE_BASE return prefix + SHARE_BASE
} }