mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Register static middleware group
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
@@ -16,6 +17,10 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
commands: __DIR__.'/../routes/console.php',
|
||||
channels: __DIR__.'/../routes/channels.php',
|
||||
health: '/up',
|
||||
then: function () {
|
||||
Route::middleware('static')
|
||||
->group(base_path('routes/static.php'));
|
||||
},
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->redirectGuestsTo(fn () => route('login'));
|
||||
@@ -63,6 +68,11 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
'role' => \Spatie\Permission\Middleware\RoleMiddleware::class,
|
||||
'role_or_permission' => \Spatie\Permission\Middleware\RoleOrPermissionMiddleware::class,
|
||||
]);
|
||||
|
||||
$middleware->group('static', [
|
||||
\App\Http\Middleware\SetCacheControlHeader::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions) {
|
||||
\Sentry\Laravel\Integration::handles($exceptions);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Static Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may register the cacheable routes for your application.
|
||||
| These routes are loaded within the "static" middleware group
|
||||
| which adds the appropriate headers to cache the response.
|
||||
|
|
||||
*/
|
||||
Reference in New Issue
Block a user