fix(routes): move auth.php require before slug catch-all

The /{slug} redirect route matched /login, /register etc. because
auth.php was required after it. Auth routes must be registered first.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-05-16 08:57:12 +02:00
parent 2924ec4bf6
commit fc5ab16f02
1 changed files with 3 additions and 4 deletions

View File

@ -37,10 +37,9 @@ Route::middleware(['auth', 'verified', ResolveWorkspace::class])
// Bio page route — must be before the slug catch-all
Route::get('/bio/{slug}', [BioPageController::class, 'show'])->name('bio.public');
// Redirect service — handles slugs on main domain and custom domains
// Placed after all named routes so dashboard/profile etc. are not caught here
require __DIR__.'/auth.php';
// Redirect service — catch-all, must be last
Route::get('/{slug}', RedirectController::class)
->where('slug', '[a-zA-Z0-9_-]+')
->name('redirect');
require __DIR__.'/auth.php';