From 9505d876bcb1c6bcbe877ff29c075129a34a735a Mon Sep 17 00:00:00 2001 From: casperiv0 <53900565+casperiv0@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:53:44 +0200 Subject: [PATCH] fix: wildcard cors origin --- apps/api/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/server.ts b/apps/api/src/server.ts index 72387f2dd..4c6fa4159 100644 --- a/apps/api/src/server.ts +++ b/apps/api/src/server.ts @@ -62,7 +62,7 @@ if (process.env.NODE_ENV === "development") { cookieParser(), compress(), json({ limit: "500kb" }), - cors({ origin: allowedCorsOrigins, credentials: true }), + cors({ origin: parsedCORSOrigin === "*" ? "*" : allowedCorsOrigins, credentials: true }), Sentry.Handlers.requestHandler({ request: true, serverName: true,