fix: remove Laravel's default /up health route - #221
Merged
Conversation
Laravel's built-in health-check convention at /up coexisted with this app's own deep /health endpoint (database, Redis, queue heartbeat checks). Unlike /health, /up never checked any of that and always returned 200 unconditionally. None of the deployment docs (DEPLOYMENT.md, DOCKER.md, LARAVEL-CLOUD.md) mention /up, but a platform or load balancer that probes health endpoints by Laravel's default convention could end up pointed at /up instead of /health, masking a real database/Redis/queue outage that /health is specifically built to catch. Remove the health: '/up' option from bootstrap/app.php so there is a single, accurate health-check endpoint. Add a regression test asserting /up is no longer registered. Fixes #158 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MZ3rHtKtxjEQKxf7nkj2TX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
bootstrap/app.phpwired up Laravel's built-in health-check convention at/up(viahealth: '/up'), alongside this app's own deep/healthendpoint (routes/web.php) that checks the database, Redis, and the queue heartbeat.Unlike
/health,/upnever checks any of that — it always returns200unconditionally, regardless of whether the database, Redis, or the queue worker are actually up.None of the deployment docs (
DEPLOYMENT.md,DOCKER.md,LARAVEL-CLOUD.md) mention/upat all — it's an orphaned artifact of Laravel's default scaffolding. But a platform or load balancer that probes health endpoints by Laravel's default convention (e.g. Laravel Cloud, or an orchestrator habitually configured to hit/up) could end up pointed at/upinstead of/health, which would report the app healthy even during a real database/Redis/queue outage — exactly the failure mode/healthwas built to catch. Having two health endpoints with different semantics under the same app is a real production-outage risk.What changed
health: '/up'option frombootstrap/app.phpso Laravel's built-in/uproute is no longer registered./health(public, minimal) and/health/detailed(authenticated, full breakdown) remain the single source of truth for health status.GET /upnow returns404.Testing
vendor/bin/pint --dirty— cleancomposer test(full suite) — 246 passed, 1 skipped (pre-existing, unrelated)Fixes #158
🤖 Generated with Claude Code
https://claude.ai/code/session_01MZ3rHtKtxjEQKxf7nkj2TX
Generated by Claude Code