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