diff --git a/src/pages/api/health.ts b/src/pages/api/health.ts new file mode 100644 index 0000000..56d9642 --- /dev/null +++ b/src/pages/api/health.ts @@ -0,0 +1,18 @@ +import type { APIRoute } from 'astro' + +// Served on demand so it always reflects the live server, never a build-time snapshot. +export const prerender = false + +export const GET: APIRoute = () => { + const body = { + status: 'ok', + } + + return new Response(JSON.stringify(body), { + status: 200, + headers: { + 'Content-Type': 'application/json', + 'Cache-Control': 'no-store', + }, + }) +}