mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-02-17 10:29:51 +03:00
Check response
This commit is contained in:
parent
340a4fb58e
commit
f0536b6347
1 changed files with 5 additions and 3 deletions
|
@ -160,9 +160,11 @@ export const redirectToCurrentProtocol = (values) => {
|
|||
// TODO
|
||||
const redirectCheck = setInterval(() => {
|
||||
fetch(`https://${hostname}${httpsPort}/${hash}`, { mode: 'no-cors' })
|
||||
.then(() => {
|
||||
clearInterval(redirectCheck);
|
||||
window.location.replace(`https://${hostname}${httpsPort}/${hash}`);
|
||||
.then((response) => {
|
||||
if (response) {
|
||||
clearInterval(redirectCheck);
|
||||
window.location.replace(`https://${hostname}${httpsPort}/${hash}`);
|
||||
}
|
||||
})
|
||||
.catch(() => false);
|
||||
}, CHECK_TIMEOUT);
|
||||
|
|
Loading…
Add table
Reference in a new issue