Check response
This commit is contained in:
parent
340a4fb58e
commit
f0536b6347
|
@ -160,9 +160,11 @@ export const redirectToCurrentProtocol = (values) => {
|
||||||
// TODO
|
// TODO
|
||||||
const redirectCheck = setInterval(() => {
|
const redirectCheck = setInterval(() => {
|
||||||
fetch(`https://${hostname}${httpsPort}/${hash}`, { mode: 'no-cors' })
|
fetch(`https://${hostname}${httpsPort}/${hash}`, { mode: 'no-cors' })
|
||||||
.then(() => {
|
.then((response) => {
|
||||||
clearInterval(redirectCheck);
|
if (response) {
|
||||||
window.location.replace(`https://${hostname}${httpsPort}/${hash}`);
|
clearInterval(redirectCheck);
|
||||||
|
window.location.replace(`https://${hostname}${httpsPort}/${hash}`);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(() => false);
|
.catch(() => false);
|
||||||
}, CHECK_TIMEOUT);
|
}, CHECK_TIMEOUT);
|
||||||
|
|
Loading…
Reference in New Issue