Deploy Ladill Transfer / deploy (push) Successful in 36s
InjectBootSplash middleware shows a self-branded loading splash once per session while the app boots, then fades out. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
1.4 KiB
PHP
34 lines
1.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
|
use Illuminate\Http\Request;
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
->withRouting(
|
|
web: __DIR__.'/../routes/web.php',
|
|
api: __DIR__.'/../routes/api.php',
|
|
commands: __DIR__.'/../routes/console.php',
|
|
health: '/up',
|
|
)
|
|
->withMiddleware(function (Middleware $middleware): void {
|
|
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
|
|
'redirect' => $request->fullUrl(),
|
|
]));
|
|
// NOTE: Middleware::alias() REPLACES the alias map (it is not additive), so every alias must be
|
|
// registered in a single call. Splitting these into two alias() calls drops 'auth.service' and
|
|
// breaks all service-to-service routes (auth.service:transfer) with "Target class does not exist".
|
|
$middleware->alias([
|
|
'auth.service' => \App\Http\Middleware\AuthenticateService::class,
|
|
'platform.session' => \App\Http\Middleware\EnsurePlatformSession::class,
|
|
]);
|
|
$middleware->web(append: [
|
|
\App\Http\Middleware\InjectBootSplash::class,
|
|
\App\Http\Middleware\SetActingAccount::class,
|
|
]);
|
|
})
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
//
|
|
})->create();
|