Skip to content

Commit d60e162

Browse files
committed
fix bug
1 parent 119e70b commit d60e162

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

webapp/packages/plugin-root/src/SessionExpireDialog/SessionExpiredDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const SessionExpiredDialog: DialogComponent<null, null> = observer(functi
2020
// routerService.reload();
2121
const currentSearch = window.location.search;
2222

23+
document.cookie = 'cb-session-id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
2324
localStorage.removeItem('TOKEN');
2425
const DMS_REDIRECT_KEY_PARAMS_NAME = 'target';
2526
window.location.href = `/login?${DMS_REDIRECT_KEY_PARAMS_NAME}=${encodeURIComponent('/project/700300/cloud-beaver' + currentSearch)}`;

webapp/packages/plugin-root/src/SessionExpireDialog/SessionExpiredDialogService.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export class SessionExpiredDialogService extends Bootstrap {
3535
const currentSearch = window.location.search;
3636

3737
localStorage.removeItem('TOKEN');
38+
// 删除 名为cb-session-id 的 cookie
39+
document.cookie = 'cb-session-id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
3840
const DMS_REDIRECT_KEY_PARAMS_NAME = 'target';
3941
window.location.href = `/login?${DMS_REDIRECT_KEY_PARAMS_NAME}=${encodeURIComponent('/project/700300/cloud-beaver' + currentSearch)}`;
4042
}

webapp/packages/plugin-sql-editor/src/SqlResultTabs/SqlAudit/SqlAuditService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export class SqlAuditService {
9191
private reload() {
9292
const currentSearch = window.location.search;
9393

94+
document.cookie = 'cb-session-id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
9495
localStorage.removeItem('TOKEN');
9596
const DMS_REDIRECT_KEY_PARAMS_NAME = 'target';
9697
window.location.href = `/login?${DMS_REDIRECT_KEY_PARAMS_NAME}=${encodeURIComponent('/project/700300/cloud-beaver' + currentSearch)}`;

0 commit comments

Comments
 (0)