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
parent
2924ec4bf6
commit
fc5ab16f02
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in New Issue