diff --git a/frontend/src/ts/modules/security/guard/auth.guard.ts b/frontend/src/ts/modules/security/guard/auth.guard.ts index b597fec0..03b424f5 100644 --- a/frontend/src/ts/modules/security/guard/auth.guard.ts +++ b/frontend/src/ts/modules/security/guard/auth.guard.ts @@ -10,7 +10,7 @@ import {AccessChecker} from "../AccessChecker"; @Injectable({providedIn: 'root'}) export abstract class AuthGuard implements CanActivate { private cspTimeout: number; - private readonly UL_LANDING_PAGE_URL = '/lkrp/ul/home.html' + private landingUlUrl: string; protected constructor( protected router: Router, @@ -21,6 +21,7 @@ export abstract class AuthGuard implements CanActivate { private progressIndicationService: ProgressIndicationService ) { this.cspTimeout = this.appConfigService.getParamValue("csp_load_timeout"); + this.landingUlUrl = this.appConfigService.getParamValue("landing_ul_url"); } public canActivate(route: ActivatedRouteSnapshot, @@ -28,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.UL_LANDING_PAGE_URL, "_self"); + window.open(url.origin + this.landingUlUrl, "_self"); return false; } return AccessChecker.checkCsp(this.cspTimeout) .then((cspCheckPassed) => { if (!cspCheckPassed) { - window.open(url.origin + this.UL_LANDING_PAGE_URL, "_self"); + window.open(url.origin + this.landingUlUrl, "_self"); return Promise.reject("CSP check failed - redirecting to home") } return Promise.resolve(this.checkAccess());