6 Commits

Author SHA1 Message Date
Michele
44fcd37366 Fix middleware redirect URLs missing basePath
- Use request.nextUrl.clone() instead of new URL() for redirects
- This preserves the /leopost basePath in redirect URLs
- Fixes 404 error when unauthenticated user visits /dashboard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:02:01 +01:00
Michele
c561299ebd Fix OAuth callback: remove from middleware, fix redirect URLs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:39:52 +01:00
Michele
1f6e0d8356 Fix middleware: only run on auth-related routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 15:25:30 +01:00
Michele
14ff7739e9 Fix middleware: skip homepage to prevent empty response
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 15:22:05 +01:00
Michele
6d1c08dce4 Temporarily disable middleware for debugging
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 15:19:52 +01:00
Michele
6cfe58e96d feat(01-05): add middleware for session refresh and route protection
- Create updateSession helper for Supabase session management
- Add main middleware with protected and auth route handling
- Configure matcher to exclude static files for performance
- Session refresh on every request prevents random logouts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:36:36 +01:00