SUPPORT-9601: fix redirect

This commit is contained in:
adel.ka 2025-11-27 09:15:44 +03:00
parent 6201c24d10
commit e58d830e0c

View file

@ -29,14 +29,14 @@ export abstract class AuthGuard implements CanActivate {
let url = new URL(window.location.href);
if (!AccessChecker.checkBrowser()) {
this.progressIndicationService.hideProgressBar();
window.open(url.origin + this.landingUlUrl, "_self");
window.location.replace(url.origin + this.landingUlUrl);
return false;
}
return AccessChecker.checkCsp(this.cspTimeout)
.then((cspCheckPassed) => {
if (!cspCheckPassed) {
window.open(url.origin + this.landingUlUrl, "_self");
window.location.replace(url.origin + this.landingUlUrl);
return Promise.reject("CSP check failed - redirecting to landing")
}
return Promise.resolve(this.checkAccess());