mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 09:04:58 +00:00
[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:
parent
f991f107da
commit
1272ac4f69
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue