Deploy Ladill Link / deploy (push) Successful in 1m41s
Public order/pay POSTs hit ladl.link first; satellite CSRF tokens cannot bind to Link (or platform/satellite) sessions, which returned 419 and showed "Could not start checkout." Except public checkout paths and return access_code from owner-gateway Paystack init. Sync contained Paystack sheet.
43 lines
1.5 KiB
PHP
43 lines
1.5 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 {
|
|
// Public QR/checkout POSTs land on ladl.link first; CSRF tokens rendered in
|
|
// satellite HTML (Merchant/Give/Events/Mini/Invoice) do not match Link's
|
|
// session — same failure mode as Laravel 419 Page Expired / "Could not start checkout".
|
|
$middleware->validateCsrfTokens(except: [
|
|
'*/register',
|
|
'*/pay',
|
|
'*/order',
|
|
'*/booking',
|
|
'*/book/order',
|
|
'i/*/pay',
|
|
]);
|
|
|
|
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
|
|
'redirect' => $request->fullUrl(),
|
|
]));
|
|
$middleware->trustProxies(at: '*');
|
|
$middleware->web(append: [
|
|
\App\Http\Middleware\InjectBootSplash::class,
|
|
\App\Http\Middleware\SetActingAccount::class,
|
|
]);
|
|
$middleware->alias([
|
|
'platform.session' => \App\Http\Middleware\EnsurePlatformSession::class,
|
|
]);
|
|
})
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
//
|
|
})->create();
|