From 288fd6f6d0fca3a811df14a901c7be4ca92c408b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Tue, 23 Apr 2024 10:39:17 +0200 Subject: [PATCH] allow all cors... --- apps/api/src/index.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 4493255b..1f98d79e 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -33,17 +33,8 @@ const startServer = async () => { maxParamLength: 5000, }); - const origin = []; - if (process.env.NODE_ENV === 'production') { - if (process.env.NEXT_PUBLIC_DASHBOARD_URL) { - origin.push(process.env.NEXT_PUBLIC_DASHBOARD_URL); - } - } else { - origin.push('http://localhost:3000'); - } - fastify.register(cors, { - origin, + origin: '*', credentials: true, });