fix(front): forcer HTTPS dès StepEmail pour éviter contexte de sécurité mixte
All checks were successful
build-and-push-ext / build_push (push) Successful in 57s
All checks were successful
build-and-push-ext / build_push (push) Successful in 57s
This commit is contained in:
parent
6a986028e9
commit
dd22e4baa0
@ -26,6 +26,14 @@ export default function StepEmail(props: IProps) {
|
|||||||
const { onSubmit, validationErrors } = props;
|
const { onSubmit, validationErrors } = props;
|
||||||
const [isErrorModalOpen, setIsErrorModalOpen] = useState(0);
|
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 router = useRouter();
|
||||||
const redirectCustomerOnConnection = useCallback(() => {
|
const redirectCustomerOnConnection = useCallback(() => {
|
||||||
async function getCustomer() {
|
async function getCustomer() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user