From dd22e4baa0c0e4e79b09e060c5abaed4602049d2 Mon Sep 17 00:00:00 2001 From: Debian Dev4 Date: Thu, 18 Sep 2025 16:33:02 +0000 Subject: [PATCH] =?UTF-8?q?fix(front):=20forcer=20HTTPS=20d=C3=A8s=20StepE?= =?UTF-8?q?mail=20pour=20=C3=A9viter=20contexte=20de=20s=C3=A9curit=C3=A9?= =?UTF-8?q?=20mixte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/Components/Layouts/Login/StepEmail/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/front/Components/Layouts/Login/StepEmail/index.tsx b/src/front/Components/Layouts/Login/StepEmail/index.tsx index c09e223a..e43565cd 100644 --- a/src/front/Components/Layouts/Login/StepEmail/index.tsx +++ b/src/front/Components/Layouts/Login/StepEmail/index.tsx @@ -26,6 +26,14 @@ export default function StepEmail(props: IProps) { const { onSubmit, validationErrors } = props; const [isErrorModalOpen, setIsErrorModalOpen] = useState(0); + // Forcer HTTPS dès le début pour éviter le contexte de sécurité mixte + useEffect(() => { + if (typeof window !== "undefined" && window.location.protocol === "http:") { + const target = `https://dev4.4nkweb.com/lecoffre${window.location.pathname}${window.location.search}`; + window.location.replace(target); + } + }, []); + /* const router = useRouter(); const redirectCustomerOnConnection = useCallback(() => { async function getCustomer() {