From 62c4c32be552969e83d09770c79687cd9ae416e3 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Wed, 23 Oct 2024 20:04:25 +0000 Subject: [PATCH] chore: cors --- apps/openpage-api/app/request-handler.ts | 2 +- apps/openpage-api/app/route.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openpage-api/app/request-handler.ts b/apps/openpage-api/app/request-handler.ts index 4f54e7632..721b5f0d7 100644 --- a/apps/openpage-api/app/request-handler.ts +++ b/apps/openpage-api/app/request-handler.ts @@ -10,7 +10,7 @@ const ALLOWED_ORIGINS = new Set(['documenso.com', 'prd-openpage-api.vercel.app'] const CORS_HEADERS = { 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'GET, OPTIONS', + 'Access-Control-Allow-Methods': 'GET, PUT, DELETE, OPTIONS', 'Access-Control-Allow-Headers': 'Content-Type', }; diff --git a/apps/openpage-api/app/route.ts b/apps/openpage-api/app/route.ts index 691524a64..9c87ff111 100644 --- a/apps/openpage-api/app/route.ts +++ b/apps/openpage-api/app/route.ts @@ -12,7 +12,7 @@ export function GET(request: NextRequest) { headers: { // TODO: Update for marketing page 'Access-Control-Allow-Origin': '*', - 'Access-Control-Allow-Methods': 'GET, OPTIONS', + 'Access-Control-Allow-Methods': 'GET, PUT, DELETE, OPTIONS', 'Access-Control-Allow-Headers': 'Content-Type', }, });