+12
-1
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Middleware\EnsureSubscribed;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
@@ -12,7 +13,17 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware): void {
|
||||
//
|
||||
$middleware->alias([
|
||||
'subscribed' => EnsureSubscribed::class,
|
||||
]);
|
||||
|
||||
// Stripe posts to the Cashier webhook with no session and no CSRF
|
||||
// token, so the path is exempted. "stripe" must match
|
||||
// config('cashier.path'), which CASHIER_PATH can change; keep the two
|
||||
// in step if the path is ever customized.
|
||||
$middleware->validateCsrfTokens(except: [
|
||||
'stripe/*',
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions): void {
|
||||
$exceptions->shouldRenderJsonWhen(
|
||||
|
||||
Reference in New Issue
Block a user