From f28b6bd93aabd8622a6d55a9f41f43631f0ecc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Sun, 29 Mar 2020 20:44:06 +0200 Subject: [PATCH] fix: Logout should not be xhr call details: https://github.com/Unleash/unleash/issues/520 --- frontend/CHANGELOG.md | 3 +++ frontend/src/store/user/actions.js | 3 +-- frontend/webpack.config.js | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md index 8bd9423c10..41a877fbb7 100644 --- a/frontend/CHANGELOG.md +++ b/frontend/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). The latest version of this document is always available in [releases][releases-url]. +## [3.2.20] +- fix: logout should be real request and not just XHR + ## [3.2.19] - fix: default groupId never set for strategies (only in ui) diff --git a/frontend/src/store/user/actions.js b/frontend/src/store/user/actions.js index 1d9bc195d5..67ee98d574 100644 --- a/frontend/src/store/user/actions.js +++ b/frontend/src/store/user/actions.js @@ -41,7 +41,6 @@ export function unsecureLogin(path, user) { export function logoutUser() { return dispatch => { dispatch({ type: USER_LOGOUT }); - - return api.logoutUser().catch(handleError); + window.location = 'logout'; }; } diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index f079267179..60244e5585 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -110,6 +110,11 @@ module.exports = { changeOrigin: true, secure: false, }, + '/logout': { + target: process.env.UNLEASH_API || 'http://localhost:4242', + changeOrigin: true, + secure: false, + }, }, port: process.env.PORT || 3000, },