Speed legacy photo serving and skip tracking on download routes.

Tighten thumbnail/legacy photo handling and exclude download/photo traffic from session visitor tracking so those hot paths stay cheap.
This commit is contained in:
2026-08-29 12:25:37 +02:00
parent e9cf754b37
commit b9beb8f5c5
8 changed files with 235 additions and 11 deletions
+6
View File
@@ -129,6 +129,12 @@ Route::get('/profile.php', function () {
// ── PROFILE (legacy URL patterns) ────────────────────────────────────────────
Route::get('/user/{username}', [ProfileController::class, 'legacyByUsername'])->where('username', '[A-Za-z0-9_-]{3,20}')->name('legacy.user.profile');
Route::get('/profile/{id}/{username?}', [ProfileController::class, 'legacyById'])->where('id', '\d+')->name('legacy.profile.id');
// Legacy profile template "Followers → All" used /following/{id}/{slug}.
// Canonical public surface is /@{username}/followers (people who follow the owner).
Route::get('/following/{id}/{slug?}', [ProfileController::class, 'legacyFollowingById'])
->where('id', '\d+')
->name('legacy.following.user');
Route::get('/profile/{username}', [ProfileController::class, 'legacyByUsername'])->where('username', '[A-Za-z0-9_-]{3,20}')->name('legacy.profile');
// Keep legacy `/user` as a permanent redirect to the canonical dashboard path.