withRouting( web: __DIR__.'/../routes/web.php', commands: __DIR__.'/../routes/console.php', channels: __DIR__.'/../routes/channels.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { // Hinter NPM (Reverse Proxy) - X-Forwarded-* Headers vertrauen, // damit Laravel HTTPS erkennt und korrekte URLs generiert. $middleware->trustProxies(at: '*'); $middleware->validateCsrfTokens(except: [ 'fox/voice', 'fox/tts', 'fox/poi-context', 'fox/route', 'fox/places', 'fox/geocode', 'fox/place-info', 'fox/cities', ]); }) ->withSchedule(function (Schedule $schedule) { $minutes = (int) env('FOX_PROACTIVE_INTERVAL_MINUTES', 0); if ($minutes > 0) { $schedule->job(new FoxProactiveJob) ->cron(sprintf('*/%d * * * *', $minutes)) ->withoutOverlapping() ->name('fox-proactive'); } }) ->withExceptions(function (Exceptions $exceptions) { // })->create();