From ca39255e8d139071d9eb67df0662cc912d0aa3b1 Mon Sep 17 00:00:00 2001 From: Craig Allen Date: Wed, 1 Apr 2026 07:49:54 -0500 Subject: [PATCH] refactor(lambda): remove CORS handling from waitlist function --- lambda/waitlist.mjs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lambda/waitlist.mjs b/lambda/waitlist.mjs index 3d0e1ce..a7b0459 100644 --- a/lambda/waitlist.mjs +++ b/lambda/waitlist.mjs @@ -4,16 +4,7 @@ const resend = new Resend(process.env.RESEND_API_KEY); const AUDIENCE_ID = process.env.RESEND_AUDIENCE_ID; export const handler = async (event) => { - const headers = { - 'Content-Type': 'application/json', - 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'POST, OPTIONS', - 'Access-Control-Allow-Headers': 'Content-Type', - }; - - if (event.requestContext?.http?.method === 'OPTIONS') { - return { statusCode: 204, headers }; - } + const headers = { 'Content-Type': 'application/json' }; if (event.requestContext?.http?.method !== 'POST') { return { statusCode: 405, headers, body: JSON.stringify({ error: 'Method not allowed' }) };