LifeMate — Personal, Family & Learning Companion
feat(cloudflare): fail-closed QA route
davoodmehraban89 committed
Oct 15, 2026 at 07:44 UTC
f18ad4164f0e4d87242b1f89c2db4dc7e6013760
1 file changed
+15
functions/api/[[path]].ts
new
+15
@@ -0,0 +1,15 @@
1
+// LifeGuide QA fail-closed backend placeholder.
2
+// An HTTP 503 JSON response is intentional until signed family sessions and
3
+// Supabase Postgres authorization are implemented in a trusted runtime.
4
+// NEVER rewrite this to proxy raw Supabase Data API with a service-role key.
5
+const headers = {
6
+ "Content-Type": "application/json; charset=utf-8",
7
+ "Cache-Control": "no-store",
8
+ "X-Content-Type-Options": "nosniff",
9
+};
10
+export const onRequest = async (): Promise<Response> =>
11
+ new Response(JSON.stringify({
12
+ error: "lifeguide_api_not_ready",
13
+ status: "degraded",
14
+ service: "lifeguide_qa",
15
+ }), { status: 503, headers });