From b228689833d1094ce5066d715bfd4df26f0ddd12 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Mon, 10 Feb 2020 11:03:45 -0500 Subject: [PATCH] Security - Inject logout url (#57201) --- x-pack/legacy/plugins/security/index.js | 1 + .../security/public/nav_control/nav_control_service.tsx | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/legacy/plugins/security/index.js b/x-pack/legacy/plugins/security/index.js index 9016398463b5f..fd89c40f010b7 100644 --- a/x-pack/legacy/plugins/security/index.js +++ b/x-pack/legacy/plugins/security/index.js @@ -86,6 +86,7 @@ export const security = kibana => tenant: server.newPlatform.setup.core.http.basePath.serverBasePath, }, enableSpaceAwarePrivileges: server.config().get('xpack.spaces.enabled'), + logoutUrl: `${server.newPlatform.setup.core.http.basePath.serverBasePath}/logout`, }; }, }, diff --git a/x-pack/plugins/security/public/nav_control/nav_control_service.tsx b/x-pack/plugins/security/public/nav_control/nav_control_service.tsx index 035549ccaa2cb..813304148ec77 100644 --- a/x-pack/plugins/security/public/nav_control/nav_control_service.tsx +++ b/x-pack/plugins/security/public/nav_control/nav_control_service.tsx @@ -65,9 +65,7 @@ export class SecurityNavControlService { mount: (el: HTMLElement) => { const I18nContext = core.i18n.Context; - const serverBasePath = core.injectedMetadata.getInjectedVar('serverBasePath') as string; - - const logoutUrl = `${serverBasePath}/logout`; + const logoutUrl = core.injectedMetadata.getInjectedVar('logoutUrl') as string; const props = { user: currentUserPromise,