mirror of
https://github.com/stashapp/stash.git
synced 2026-01-06 07:38:49 +01:00
Fix login redirect to remember current page (#989)
This commit is contained in:
parent
4a08bd351a
commit
931d3a0974
2 changed files with 6 additions and 1 deletions
|
|
@ -10,3 +10,6 @@
|
|||
* Use natural sort for titles and movie names.
|
||||
* Support optional preview and sprite generation during scanning.
|
||||
* Support configurable number of threads for scanning and generation.
|
||||
|
||||
### 🐛 Bug fixes
|
||||
* Fixed login redirect to remember the current page.
|
||||
|
|
|
|||
|
|
@ -113,7 +113,9 @@ export const createClient = () => {
|
|||
// handle unauthorized error by redirecting to the login page
|
||||
if (networkError && (networkError as ServerError).statusCode === 401) {
|
||||
// redirect to login page
|
||||
window.location.href = "/login";
|
||||
const newURL = new URL("/login", window.location.toString());
|
||||
newURL.searchParams.append("returnURL", window.location.href);
|
||||
window.location.href = newURL.toString();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue