diff --git a/ui/public/embeb.js b/ui/public/embeb.js index 99177b8d4..163969b88 100644 --- a/ui/public/embeb.js +++ b/ui/public/embeb.js @@ -83,11 +83,11 @@ function embedChatbot() { if(is_404){ document.body.removeChild(chat_container) document.body.append(chat_container) + is_404=false - }else{ - chat_container.style['display']='block' - } - + } + chat_container.style['display']='block' + }else{ is_404=true } diff --git a/ui/src/request/index.ts b/ui/src/request/index.ts index d51a3ca19..85354b032 100644 --- a/ui/src/request/index.ts +++ b/ui/src/request/index.ts @@ -56,7 +56,11 @@ instance.interceptors.response.use( router.push('/404 ') } if (err.response?.status === 401) { - router.push({ name: 'login' }) + if (err.response.config.url.includes('chat/open')) { + router.push('/404 ') + } else { + router.push({ name: 'login' }) + } } if (err.response?.status === 403 && !err.response.config.url.includes('chat/open')) {