Fix proxied checkout CSRF for Merchant, Give, Invoice and Events.
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.
This commit is contained in:
isaacclad
2026-07-21 22:53:52 +00:00
parent 5166cd8a64
commit 97a30ee6b3
4 changed files with 493 additions and 58 deletions
+7
View File
@@ -13,6 +13,13 @@ return Application::configure(basePath: dirname(__DIR__))
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(),
]));