withRouting( web: __DIR__.'/../routes/web.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { // SHJ-4A ウェルネット決済情報受信用エンドポイントのCSRF例外設定 // 外部システムからのPOSTリクエストのためCSRF保護を無効化 $middleware->validateCsrfTokens(except: [ '/shj4a', // SHJ-4A本番用エンドポイント '/webhook/wellnet', // SHJ-4A開発・デバッグ用エンドポイント ]); // グローバルミドルウェア登録(すべてのリクエストに適用) $middleware->append(\App\Http\Middleware\ShareMenuAccessData::class); // ミドルウェアエイリアス登録 $middleware->alias([ 'check.city.access' => \App\Http\Middleware\CheckCityAccess::class, 'ensure.otp.verified' => \App\Http\Middleware\EnsureOtpVerified::class, 'check.password.change.required' => \App\Http\Middleware\CheckPasswordChangeRequired::class, ]); }) ->withExceptions(function (Exceptions $exceptions) { // })->create();