// src/pages/api/submit.ts import type { APIRoute } from 'astro'; import { getSecret } from 'astro:env/server'; import { submitToCoreForms } from '../../lib/core-forms-proxy'; export const prerender = false; export const POST: APIRoute = ({ request }) => submitToCoreForms(request, { upstream: getSecret('CORE_FORMS_UPSTREAM'), formId: getSecret('CORE_FORMS_FORM_ID'), apiKey: getSecret('CORE_FORMS_API_KEY'), allowedOrigins: getSecret('CORE_FORMS_ALLOWED_ORIGINS'), });