From f3409e561828ad95d2698a9194ad4b41f027c953 Mon Sep 17 00:00:00 2001 From: Zotov Ivan Yuryevich Date: Wed, 17 Jun 2026 22:49:43 +0300 Subject: [PATCH] chore: add health endpoint --- src/pages/api/health.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/pages/api/health.ts 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', + }, + }) +}