Files
coruna-lab/routes/web.php
T
2026-08-15 02:56:38 +08:00

26 lines
888 B
PHP

<?php
use App\Http\Controllers\PageHitController;
use App\Models\Channel;
use Illuminate\Support\Facades\Route;
// Route::get('/', function () {
// return redirect()->route('admin.login');
// });
// 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);
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}');