/** * Health check endpoint * GET /api/health → Worker GET /health */ import { type PagesFunction } from '@cloudflare/workers-types'; import { Env, createCorsPreflightResponse, proxyToWorker } from '../_shared/proxy'; export const onRequestGet: PagesFunction = async ({ env }) => { return proxyToWorker(env, '/health', { method: 'GET', }); }; export const onRequestOptions: PagesFunction = async () => { return createCorsPreflightResponse(); };