diff --git a/app/Http/Controllers/SimpleHealthCheckController.php b/app/Http/Controllers/SimpleHealthCheckController.php deleted file mode 100644 index efe0943..0000000 --- a/app/Http/Controllers/SimpleHealthCheckController.php +++ /dev/null @@ -1,30 +0,0 @@ -has('fresh') || config('health.oh_dear_endpoint.always_send_fresh_results')) { - Artisan::call(RunHealthChecksCommand::class); - } - - // Modified behavior: check only for failed checks but not warning checks - if (!($resultStore->latestResults()?->containsCheckWithStatus(Status::failed()))) { - throw new ServiceUnavailableHttpException(message: 'Application not healthy'); - } - - return response([ - 'healthy' => true, - ]) - ->header('Content-Type', 'application/json') - ->header('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); - } -} diff --git a/routes/web.php b/routes/web.php index ecdff23..8323451 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,6 +1,7 @@