[BUG] Use correct logout URL

- If a `logout` event is send the user should be redirected to the
homepage, there are three mechanism that can do this. The response of
`/user/logout` and the event listener of notifications or stopwatch.
It's essentially a race for what's processed first to determine which
mechanism takes care of redirecting the user.
- Fix that the redirection mechanism of the notification and stopwatch
event listener redirects to an absolute URL.
- Ref: #2135
This commit is contained in:
Gusted 2024-02-25 21:24:12 +01:00
parent f991f107da
commit 1272ac4f69
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 2 additions and 2 deletions

View file

@ -112,7 +112,7 @@ export function initNotificationCount() {
type: 'close',
});
worker.port.close();
window.location.href = appSubUrl;
window.location.href = `${window.location.origin}${appSubUrl}/`;
} else if (event.data.type === 'close') {
worker.port.postMessage({
type: 'close',

View file

@ -74,7 +74,7 @@ export function initStopwatch() {
type: 'close',
});
worker.port.close();
window.location.href = appSubUrl;
window.location.href = `${window.location.origin}${appSubUrl}/`;
} else if (event.data.type === 'close') {
worker.port.postMessage({
type: 'close',