From 7a9417297f69d4c32775a7b4f7ceaf7bf36cec03 Mon Sep 17 00:00:00 2001 From: M1 Date: Wed, 18 Mar 2026 09:41:09 +0400 Subject: [PATCH] fix: add preflight CORS options for api.pingql.com --- apps/api/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index bb572a0..db49bc6 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -12,6 +12,9 @@ const app = new Elysia() .use(cors({ origin: process.env.CORS_ORIGINS?.split(",") ?? ["https://pingql.com"], credentials: true, + allowedHeaders: ["Content-Type", "Authorization"], + methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], + preflight: true, })) .get("/", () => ({ name: "PingQL API",