From c1cfd6e28059fb6b6db5e6464e9b64839f027062 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Mon, 10 Feb 2020 12:53:33 -0500 Subject: [PATCH] [7.6] Security - Inject logout url (#57201) (#57211) --- 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 130fbfab8ff94..88823a9237fb1 100644 --- a/x-pack/legacy/plugins/security/index.js +++ b/x-pack/legacy/plugins/security/index.js @@ -112,6 +112,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,