mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-09 04:19:32 +08:00
15 lines
546 B
PHP
15 lines
546 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Enums\GroupConfigKey;
|
|
use App\Enums\ConfigKey;
|
|
|
|
$extensions = config('convention.group.accepted_file_suffixes');
|
|
Route::middleware('cache.headers:public;max_age=2628000;etag')->group(function () use ($extensions) {
|
|
$extensions = array_merge(array_map('strtoupper', $extensions), array_map('strtolower', $extensions));
|
|
Route::any('{key}.{extension}', [
|
|
Controller::class, 'output',
|
|
])->where('extension', implode('|', $extensions));
|
|
});
|