mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Fix login redirect to remember current page (#989)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user