From: Shohei Kameda Date: Fri, 24 May 2019 11:35:41 +0000 (+0900) Subject: html: reload page when basic auth is failed (#187) X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=b525417ec86fff4a1d4dd9fb57888ae5174b0c90;p=ttyd.git html: reload page when basic auth is failed (#187) --- diff --git a/html/js/app.ts b/html/js/app.ts index 5436850..d74ca8a 100644 --- a/html/js/app.ts +++ b/html/js/app.ts @@ -208,6 +208,10 @@ const openWs = function(): void { } } window.removeEventListener('beforeunload', unloadCallback); + // 1008: POLICY_VIOLATION - Auth failure + if (event.code === 1008) { + location.reload(); + } // 1000: CLOSE_NORMAL if (event.code !== 1000 && autoReconnect > 0) { term.reconnectTimeout = setTimeout(openWs, autoReconnect * 1000); diff --git a/src/index.html b/src/index.html index 72495c9..2faa92d 100644 --- a/src/index.html +++ b/src/index.html @@ -1,3 +1,3 @@ ttyd - Terminal
\ No newline at end of file +/*# sourceMappingURL=app.9cb3870e18634056c702.css.map */
\ No newline at end of file