File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/ai-workspace-common/src/components/home-redirect Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ export const HomeRedirect = ({ defaultNode }: { defaultNode: ReactNode }) => {
1515 if ( isLogin ) {
1616 return < Navigate to = { '/workspace' } replace /> ;
1717 }
18+
19+ // In local development (localhost), redirect to /login directly to avoid infinite loading
20+ const hostname = window . location . hostname ;
21+ const isLocalhost = hostname === 'localhost' || hostname === '127.0.0.1' || hostname === '::1' ;
22+
23+ if ( isLocalhost ) {
24+ return < Navigate to = "/login" replace /> ;
25+ }
26+
1827 // Return defaultNode to allow server-side handling (e.g., Cloudflare Worker)
1928 // BackendRedirect will handle the redirect and avoid infinite loop
2029 return defaultNode ;
You can’t perform that action at this time.
0 commit comments