Deploy Ladill Merchant / deploy (push) Successful in 46s
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.
38 lines
1.4 KiB
PHP
38 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 {
|
|
// Storefront/booking POSTs are proxied ladl.link → platform → Merchant without
|
|
// a browser session cookie that matches merchant CSRF tokens.
|
|
$middleware->validateCsrfTokens(except: [
|
|
'q/*/order',
|
|
'q/*/booking',
|
|
]);
|
|
|
|
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
|
|
'redirect' => $request->fullUrl(),
|
|
]));
|
|
$middleware->web(append: [
|
|
\App\Http\Middleware\InjectBootSplash::class,
|
|
\App\Http\Middleware\SetActingAccount::class,
|
|
]);
|
|
$middleware->alias([
|
|
'platform.session' => \App\Http\Middleware\EnsurePlatformSession::class,
|
|
'redirect.legacy.qr' => \App\Http\Middleware\RedirectLegacyQrToLadillLink::class,
|
|
]);
|
|
})
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
//
|
|
})->create();
|