feat(router): prevent redirection from public landing pages on session expiration
This commit is contained in:
@@ -278,13 +278,13 @@ const store = createStore({
|
||||
}
|
||||
await dispatch('loadMenu');
|
||||
},
|
||||
logout({ commit }) {
|
||||
logout({ commit }, { redirectToHome = true } = {}) {
|
||||
commit('clearSocket');
|
||||
commit('clearDaemonSocket');
|
||||
commit('dologout');
|
||||
// Öffentliche SEO-Landingpages müssen auch dann an ihrer URL bleiben,
|
||||
// wenn eine gespeicherte Sitzung abgelaufen ist und per 401 zurückgesetzt wird.
|
||||
if (!router.currentRoute.value.meta?.publicLanding) {
|
||||
if (redirectToHome && !router.currentRoute.value.meta?.publicLanding) {
|
||||
router.push('/');
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user