Fix proxied checkout CSRF for Merchant, Give, Invoice and Events.
Deploy Ladill Link / deploy (push) Successful in 1m41s
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.
This commit is contained in:
+7
-2
@@ -13,11 +13,16 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||||||
health: '/up',
|
health: '/up',
|
||||||
)
|
)
|
||||||
->withMiddleware(function (Middleware $middleware): void {
|
->withMiddleware(function (Middleware $middleware): void {
|
||||||
// Public QR action POSTs land on ladl.link first; CSRF tokens from satellite HTML (Events/Mini)
|
// Public QR/checkout POSTs land on ladl.link first; CSRF tokens rendered in
|
||||||
// do not match Link's session — same failure mode as Laravel 419 Page Expired.
|
// 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: [
|
$middleware->validateCsrfTokens(except: [
|
||||||
'*/register',
|
'*/register',
|
||||||
'*/pay',
|
'*/pay',
|
||||||
|
'*/order',
|
||||||
|
'*/booking',
|
||||||
|
'*/book/order',
|
||||||
|
'i/*/pay',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
|
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
|
||||||
|
|||||||
Reference in New Issue
Block a user