2026-01-15 01:13:44 +00:00
|
|
|
<?php
|
|
|
|
|
|
2026-03-29 22:24:28 +00:00
|
|
|
use App\Http\Middleware\Api\AuthenticateApiToken;
|
2026-01-17 02:46:30 +00:00
|
|
|
use App\Http\Middleware\EnsureSubscribed;
|
2026-01-15 01:13:44 +00:00
|
|
|
use App\Http\Middleware\HandleAppearance;
|
|
|
|
|
use App\Http\Middleware\HandleInertiaRequests;
|
|
|
|
|
use Illuminate\Foundation\Application;
|
|
|
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
|
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
|
|
|
|
use Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets;
|
|
|
|
|
|
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
|
|
|
->withRouting(
|
|
|
|
|
web: __DIR__.'/../routes/web.php',
|
2026-03-29 22:24:28 +00:00
|
|
|
api: __DIR__.'/../routes/api.php',
|
|
|
|
|
apiPrefix: '',
|
2026-01-15 01:13:44 +00:00
|
|
|
commands: __DIR__.'/../routes/console.php',
|
2026-01-15 17:24:39 +00:00
|
|
|
channels: __DIR__.'/../routes/channels.php',
|
2026-01-15 01:13:44 +00:00
|
|
|
health: '/up',
|
|
|
|
|
)
|
|
|
|
|
->withMiddleware(function (Middleware $middleware): void {
|
2026-03-29 22:59:17 +00:00
|
|
|
$middleware->trustProxies(at: '*');
|
|
|
|
|
|
2026-01-15 01:13:44 +00:00
|
|
|
$middleware->encryptCookies(except: ['appearance', 'sidebar_state']);
|
|
|
|
|
|
|
|
|
|
$middleware->web(append: [
|
|
|
|
|
HandleAppearance::class,
|
|
|
|
|
HandleInertiaRequests::class,
|
|
|
|
|
AddLinkHeadersForPreloadedAssets::class,
|
|
|
|
|
]);
|
2026-01-17 02:46:30 +00:00
|
|
|
|
|
|
|
|
$middleware->alias([
|
|
|
|
|
'subscribed' => EnsureSubscribed::class,
|
2026-03-29 22:24:28 +00:00
|
|
|
'api.auth' => AuthenticateApiToken::class,
|
|
|
|
|
]);
|
|
|
|
|
|
2026-03-29 22:59:17 +00:00
|
|
|
$middleware->preventRequestForgery(except: [
|
2026-03-29 22:24:28 +00:00
|
|
|
'stripe/*',
|
2026-01-17 02:46:30 +00:00
|
|
|
]);
|
2026-01-15 01:13:44 +00:00
|
|
|
})
|
|
|
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
|
|
|
//
|
|
|
|
|
})->create();
|