diff --git a/src/app/elements/iframe/iframe.component.ts b/src/app/elements/iframe/iframe.component.ts index 3a59182f..ee77bc0f 100644 --- a/src/app/elements/iframe/iframe.component.ts +++ b/src/app/elements/iframe/iframe.component.ts @@ -75,8 +75,10 @@ export class ElementIframeComponent implements OnInit, AfterViewInit, OnDestroy setTimeout(function () { // 长时间未PING通, 则主动关闭 clearInterval(this.ping); - const msg = this._i18n.instant('Failed to open address'); - alert(`${msg}:\n${this.src}`); + if (!this.show) { + const msg = this._i18n.instant('Failed to open address'); + alert(`${msg}:\n${this.src}`); + } }.bind(this), 500 * 20); } diff --git a/src/app/globals.ts b/src/app/globals.ts index 7450158d..d717f0c0 100644 --- a/src/app/globals.ts +++ b/src/app/globals.ts @@ -52,7 +52,7 @@ export const TYPE_DB_GUI: ConnectType = { id: 'dbGUI', requireXPack: true, protocol: 'http', - client: true + client: false }; export const TYPE_DB_CLIENT: ConnectType = { diff --git a/src/app/utils/common.ts b/src/app/utils/common.ts index 940783af..667ea448 100644 --- a/src/app/utils/common.ts +++ b/src/app/utils/common.ts @@ -51,7 +51,7 @@ export function getCookie(name: string): string { export function getCsrfTokenFromCookie(): string { let prefix = getCookie('SESSION_COOKIE_NAME_PREFIX'); - if (!prefix) { prefix = ''; } + if (!prefix || [`""`, `''`].indexOf(prefix) > -1) { prefix = ''; } const name = `${prefix}csrftoken`; return getCookie(name); }