Skip to content

Commit 41efcc3

Browse files
mrjasonroyclaude
andcommitted
fix: add missing /api/health endpoint for Kubernetes probes
The Kubernetes liveness and readiness probes were failing with 404 because the /api/health endpoint didn't exist, causing pods to enter CrashLoopBackOff state. This adds a simple health check endpoint that returns: - HTTP 200 status - JSON response with status and timestamp Fixes the production deployment issue where pods were failing health checks and restarting continuously. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent cbbd78a commit 41efcc3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/app/api/health/route.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NextResponse } from "next/server";
2+
3+
export async function GET() {
4+
return NextResponse.json(
5+
{
6+
status: "ok",
7+
timestamp: new Date().toISOString(),
8+
},
9+
{ status: 200 },
10+
);
11+
}

src/proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ export async function proxy(request: NextRequest) {
2626

2727
export const config = {
2828
matcher: [
29-
"/((?!_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|api/auth|export|sign-in|sign-up).*)",
29+
"/((?!_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt|api/auth|api/health|export|sign-in|sign-up).*)",
3030
],
3131
};

0 commit comments

Comments
 (0)