fix(console): remove basepath from statehandler (#3815)

fix: remove basepath from statehandler
This commit is contained in:
Max Peintner 2022-06-13 10:56:35 +02:00 committed by GitHub
parent 1da305f2de
commit 5c805c48db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,9 +49,11 @@ export class StatehandlerServiceImpl implements StatehandlerService, OnDestroy {
switchMap((url: string) => {
if (url.includes('?login_hint=')) {
const newUrl = this.removeParam('login_hint', url);
return of(this.processor.createState(newUrl));
const urlWithoutBasePath = newUrl.startsWith('/ui/console') ? newUrl.replace('/ui/console', '') : newUrl;
return of(this.processor.createState(urlWithoutBasePath));
} else if (url) {
return of(this.processor.createState(url));
const urlWithoutBasePath = url.startsWith('/ui/console') ? url.replace('/ui/console', '') : url;
return of(this.processor.createState(urlWithoutBasePath));
} else {
return of(undefined);
}