SSE鉴权失效停止重连清理会话跳登录并降噪4xx错误日志
This commit is contained in:
@@ -45,6 +45,11 @@ export default function WorkerLayout() {
|
||||
url: '/api/v1/worker/realtime',
|
||||
token: getWorkerToken(),
|
||||
onEvent: (event) => applyWorkerRealtimeEvent(event, queryClient),
|
||||
// 会话过期时清登录态回登录页,避免 SSE 带着失效 token 无限重连刷 401。
|
||||
onAuthExpired: () => {
|
||||
clearWorkerSession()
|
||||
void navigate('/', { replace: true })
|
||||
},
|
||||
})
|
||||
|
||||
async function submitLogout() {
|
||||
|
||||
Reference in New Issue
Block a user