mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 07:06:36 +08:00
fix(frontend): repair login session flow
Resolve login-page 401 hangs and redirect races by relying on the shared user state. Keep protected-route redirects intact, clean pending requests without unhandled rejections, and allow the dynamic icon route through the page proxy.
This commit is contained in:
+1
-1
@@ -103,7 +103,7 @@ export function proxy(request: NextRequest) {
|
||||
}
|
||||
|
||||
/* 页面请求:公共路由放行 */
|
||||
const publicRoutes = ['/', '/login', '/register', '/callback', '/privacy', '/terms']
|
||||
const publicRoutes = ['/', '/login', '/register', '/callback', '/privacy', '/terms', '/icon']
|
||||
const publicPrefixes = ['/docs/', '/epay/']
|
||||
|
||||
if (publicRoutes.includes(pathname) || publicPrefixes.some(p => pathname.startsWith(p))) {
|
||||
|
||||
Reference in New Issue
Block a user