mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 23:24:21 +00:00
fix(webui): prevent infinite redirect loop between /signup and /login
This commit is contained in:
@@ -11,6 +11,7 @@ const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
|
|||||||
// Don't redirect if we are already on login page, it's an auth request, or we are on a public share page
|
// Don't redirect if we are already on login page, it's an auth request, or we are on a public share page
|
||||||
if (
|
if (
|
||||||
!window.location.pathname.includes('/login') &&
|
!window.location.pathname.includes('/login') &&
|
||||||
|
!window.location.pathname.includes('/signup') &&
|
||||||
!window.location.pathname.startsWith('/share/') &&
|
!window.location.pathname.startsWith('/share/') &&
|
||||||
!url.includes('/api/authn')
|
!url.includes('/api/authn')
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user