import { NextResponse } from 'next/server'; import { env } from '@/lib/env'; /** * GET /api/public/health * * Public-facing health probe. Used by the marketing-website server on * startup to verify it's pointed at a CRM matching its own deployment * env (plan ยง14.8 critical: prevent staging-website-talking-to-prod-CRM). * * Returns the CRM's `NODE_ENV` and `APP_URL` so the website can do a * strict equality check before serving any request. */ export function GET(): Response { return NextResponse.json( { status: 'ok', env: env.NODE_ENV, appUrl: env.APP_URL, timestamp: new Date().toISOString(), }, { headers: { 'cache-control': 'no-store' } }, ); }