From f1c33d90cda1bc474eb903cf4e3a7e1e91f21479 Mon Sep 17 00:00:00 2001 From: Stavros Date: Sun, 9 Mar 2025 18:31:11 +0200 Subject: [PATCH] refactor: skip all checks when disable continue is enabled --- site/src/pages/continue-page.tsx | 37 +++++++++++++++----------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/site/src/pages/continue-page.tsx b/site/src/pages/continue-page.tsx index 33b79ae..6a9a662 100644 --- a/site/src/pages/continue-page.tsx +++ b/site/src/pages/continue-page.tsx @@ -50,26 +50,6 @@ export const ContinuePage = () => { ); } - if ( - window.location.protocol === "https:" && - uri.protocol === "http:" - ) { - return ( - - - Insecure Redirect - - - Your are logged in but trying to redirect from https to{" "} - http, please click the button to redirect. - - - - ); - } - if (disableContinue) { window.location.href = redirectUri; return ( @@ -82,6 +62,23 @@ export const ContinuePage = () => { ); } + if (window.location.protocol === "https:" && uri.protocol === "http:") { + return ( + + + Insecure Redirect + + + Your are trying to redirect from https to{" "} + http, are you sure you want to continue? + + + + ); + } + return (