PR CI / ledger (pull_request) Successful in 3s
PR CI / flow (pull_request) Successful in 4s
PR CI / ui (pull_request) Successful in 17s
PR CI / test (lowest) (pull_request) Successful in 45s
PR CI / test (stable) (pull_request) Successful in 48s
PR CI / security (pull_request) Successful in 54s
PR CI / pr-ci (pull_request) Successful in 1s
PR CI / release-automerge (pull_request) Successful in 3s
14 lines
594 B
PHP
14 lines
594 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use IriksIT\Manager\Modules\Media\MediaFileController;
|
|
use IriksIT\Manager\Support\Names;
|
|
|
|
// Files of the media library, for visitors. No session and no cookies: this is a file, not a
|
|
// page, and the browser may cache it for good. The address ends in /view on purpose: web servers
|
|
// tend to answer anything that ends in .jpg themselves and never ask the app.
|
|
Route::get('/media-files/{media}/{filename}/view', MediaFileController::class)
|
|
->whereNumber('media')
|
|
->middleware('throttle:media-files')
|
|
->name(Names::route('media.file'));
|