Skip to content

Add GET /api/health for status.profullstack.com - #179

Merged
ralyodio merged 1 commit into
masterfrom
ops/health-endpoint
Oct 6, 2026
Merged

ralyodio merged 1 commit into
masterfrom
ops/health-endpoint

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Adds a public GET /api/health so status.profullstack.com (Gatus) can check real app health instead of the home page.

Why it 404'd: no route existed, so the path fell into app/api/[[...slug]], which returns a JSON 404. A static segment wins over the optional catch-all.

  • 200 {"status":"ok","db":"ok"} after select 1 via the existing sqlClient (libsql-pg over Postgres)
  • 503 {"status":"error","db":"down"} on failure or after a 3s timeout
  • Cache-Control: no-store, no auth, no error details, no new deps. The middleware only gates AI training crawlers and www->apex, so Gatus passes through.

🤖 Generated with Claude Code

/api/health fell through to the api [[...slug]] catch-all and returned the
JSON 404. The new route answers {status:ok, db:ok} with Cache-Control:
no-store after a select 1 through the shared client, or 503
{status:error, db:down} if the database does not answer within 3s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

11 finding(s)

MEDIUM: 9 | LOW: 2

Severity Rule Location
MEDIUM js-unescaped-html-sink apps/web/app/about/page.tsx:40
MEDIUM sql-template-interpolation apps/web/app/api/admin/media/[id]/route.ts:30
MEDIUM sql-template-interpolation apps/web/app/api/admin/tags/[id]/route.ts:22
MEDIUM sql-template-interpolation apps/web/app/api/admin/users/[id]/route.ts:23
MEDIUM js-unescaped-html-sink apps/web/app/layout.tsx:55
MEDIUM js-unescaped-html-sink apps/web/app/pricing/page.tsx:17
MEDIUM js-unescaped-html-sink apps/web/components/NewsletterComposer.tsx:87
MEDIUM sql-template-interpolation apps/web/lib/queries.ts:169
MEDIUM sql-template-interpolation apps/web/lib/rewards.ts:198
LOW sql-template-interpolation apps/web/lib/rewards.test.ts:86
LOW js-unescaped-html-sink docs/design_handoff_aiornot_vote/image-slot.js:455

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit aead89d into master Oct 6, 2026
6 of 7 checks passed
@ralyodio
ralyodio deleted the ops/health-endpoint branch October 6, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant