diff --git a/src/app/account-self-deletion/account-self-deletion.component.ts b/src/app/account-self-deletion/account-self-deletion.component.ts index 758cfe04631ca522abef6d208a680774f5d3733c..277d94e05524300e6b15cd7d5722c684b6182d4d 100644 --- a/src/app/account-self-deletion/account-self-deletion.component.ts +++ b/src/app/account-self-deletion/account-self-deletion.component.ts @@ -11,7 +11,7 @@ import {environment} from "../../environments/environment"; }) export class AccountSelfDeletionComponent implements OnInit { private logHeader = ''; - private redirectLoction = ''; + private redirectLocation = ''; constructor(public accountService: AccountService, public messageService: MessageService, ) {} @@ -25,16 +25,12 @@ export class AccountSelfDeletionComponent implements OnInit { if we just use /auth this will fails as we get redirect to http://localhaost:4200:/auth To overcome this we have defined environment.proxyKeycloakURL */ - if (!environment.production) { - this.redirectLoction = environment.proxyKeycloakURL; - } - else { - this.redirectLoction = environment.keycloakURL; - } - this.redirectLoction = this.redirectLoction + 'realms/RBAC/account/#/personal-info'; - console.warn('Now running Page Redirect to : ' + this.redirectLoction); + this.redirectLocation = environment.realKeycloakURL; + + this.redirectLocation = this.redirectLocation + 'realms/RBAC/account/#/personal-info'; + console.warn(this.logHeader + 'Running Page Redirect to : ' + this.redirectLocation); //window.location.href = "https://kube-master-h1.informatik.fh-nuernberg.de/auth/realms/RBAC/account/#/personal-info"; - window.location.href = this.redirectLoction; + window.location.href = this.redirectLocation; } } diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 04d3a58be5e31ee18fba4f7f04a40baec8fc9353..656e86e5abb1b7c60f10418bef9798155af1a08d 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -2,10 +2,9 @@ declare const require: any; export const environment = { production: true, - //keycloakURL: 'https://kube-master-h1.informatik.fh-nuernberg.de/auth/', - //apiURL: 'https://kube-master-h1.informatik.fh-nuernberg.de/api', + // Only used for in account-self-deletion.component component for keycloak page redirect + realKeycloakURL: 'http://localhost:8280/auth/', keycloakURL: '/auth/', - proxyKeycloakURL: '/auth/', apiURL: '/api', appVersion: require('../../package.json').version }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index f8058b49342287957751eb8ff2238a2e3c3837c4..90ce6e88a075771a1bdc993999915414af144e22 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,18 +6,16 @@ declare const require: any; export const environment = { production: false, - // keycloakURL: 'http://localhost:8280/auth/' + // Only used for in account-self-deletion.component component for keycloak page redirect + realKeycloakURL: 'http://localhost:8280/auth/', keycloakURL: '/auth/', - // Only used for development in account-self-deletion.component component for page redirect - proxyKeycloakURL: 'https://kube-master-h1.informatik.fh-nuernberg.de/auth/', - // apiURL: 'http://localhost:8080/api', apiURL: '/api', appVersion: require('../../package.json').version }; /* - * For easier debugging in development mode, you can import the following file + * For easier debugging in development mode, yu can import the following file * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. * * This import should be commented out in production mode because it will have a negative impact