Cleanup singOutUrl
This commit is contained in:
parent
45a9033299
commit
3f455aedd9
1 changed files with 1 additions and 2 deletions
|
@ -48,14 +48,13 @@ const Header: React.FC<HeaderProps> = () => {
|
|||
|
||||
const navigationItems = filterNavigationByDashboardRole(isAdmin);
|
||||
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
const signOutUrl = useMemo(() => {
|
||||
const { hostname } = window.location;
|
||||
// If we are developing locally, we need to use the init cluster's public URL
|
||||
if (hostname === 'localhost') {
|
||||
return `https://sso.init.stackspin.net/oauth2/sessions/logout`;
|
||||
}
|
||||
return `https://sso.${hostname.replace('dashboard', '')}/oauth2/sessions/logout`;
|
||||
return `https://${hostname.replace('dashboard', 'sso')}/oauth2/sessions/logout`;
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue