mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-15 22:01:08 +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
2 changed files with 2 additions and 2 deletions
|
@ -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