fix(csrf): exclude tracking endpoints from csrf verification to prevent 419 errors
This commit is contained in:
+6
-2
@@ -35,8 +35,12 @@ return Application::configure(basePath: dirname(__DIR__))
|
|||||||
$middleware->web(\App\Http\Middleware\BotDetector::class);
|
$middleware->web(\App\Http\Middleware\BotDetector::class);
|
||||||
// SEO yönlendirmeleri
|
// SEO yönlendirmeleri
|
||||||
$middleware->web(\App\Http\Middleware\SeoRedirectMiddleware::class);
|
$middleware->web(\App\Http\Middleware\SeoRedirectMiddleware::class);
|
||||||
// iyzico callback CSRF muaf
|
// iyzico callback ve arka plan izleme metrikleri (beacon/fetch) CSRF muaf
|
||||||
$middleware->validateCsrfTokens(except: ['checkout/callback']);
|
$middleware->validateCsrfTokens(except: [
|
||||||
|
'checkout/callback',
|
||||||
|
'track/*',
|
||||||
|
'api/*',
|
||||||
|
]);
|
||||||
})
|
})
|
||||||
->withExceptions(function (Exceptions $exceptions): void {
|
->withExceptions(function (Exceptions $exceptions): void {
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user