Exempt public event registration POST from ladill-link CSRF checks.
Deploy Ladill Link / deploy (push) Successful in 46s

Registration forms post to ladl.link first; Events-issued CSRF tokens cannot
validate against the Link app session and caused token mismatch errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-03 14:18:33 +00:00
co-authored by Cursor
parent 4dedcf84f6
commit ac7bef1e24
2 changed files with 36 additions and 0 deletions
+5
View File
@@ -13,6 +13,11 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
// Public event registration POSTs land on ladl.link first; CSRF tokens from Events HTML do not match here.
$middleware->validateCsrfTokens(except: [
'*/register',
]);
$middleware->redirectGuestsTo(fn (Request $request) => route('sso.connect', [
'redirect' => $request->fullUrl(),
]));