feat: quene
This commit is contained in:
+12
-11
@@ -11,15 +11,16 @@ use Illuminate\Support\Facades\Route;
|
||||
// Anonymous page-visit beacon (PV/UV); no session / CSRF.
|
||||
Route::match(['GET', 'POST'], '/statistic/t', PageHitController::class)->name('page.hit');
|
||||
|
||||
// Equal-length alias for secondary's hardcoded /details/show.html → /c/{ver}/show.htm
|
||||
Route::get('/c/{ver}/show.htm', function (string $ver) {
|
||||
$ver = Channel::normalizeNewChannelId($ver);
|
||||
abort_if($ver === null, 404);
|
||||
$path = public_path('channel/'.$ver.'/details/show.html');
|
||||
abort_unless(is_file($path), 404);
|
||||
// Equal-length alias: /details/show.html → /c/{ver}/show.htm
|
||||
// Production: Nginx serves this statically (docs/BAOTA_DEPLOY.md §1.3). This is the fallback.
|
||||
// Route::get('/c/{ver}/show.htm', function (string $ver) {
|
||||
// $ver = Channel::normalizeNewChannelId($ver);
|
||||
// abort_if($ver === null, 404);
|
||||
// $path = public_path('channel/'.$ver.'/details/show.html');
|
||||
// abort_unless(is_file($path), 404);
|
||||
|
||||
return response()->file($path, [
|
||||
'Content-Type' => 'application/octet-stream',
|
||||
'Cache-Control' => 'no-store',
|
||||
]);
|
||||
})->where('ver', '[0-9A-Za-z]\\.[0-9A-Za-z]\\.[0-9A-Za-z]{2}');
|
||||
// return response()->file($path, [
|
||||
// 'Content-Type' => 'application/octet-stream',
|
||||
// 'Cache-Control' => 'public, max-age=60',
|
||||
// ]);
|
||||
// })->where('ver', '[0-9A-Za-z]\\.[0-9A-Za-z]\\.[0-9A-Za-z]{2}');
|
||||
|
||||
Reference in New Issue
Block a user