From 23878e3f3e8d9b9e516b56ddff49b4bac7ee1007 Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:53:34 +0530 Subject: [PATCH] ill just look tommorow --- .vitepress/routes/index.options.ts | 9 --------- .vitepress/routes/index.post.ts | 2 -- 2 files changed, 11 deletions(-) delete mode 100644 .vitepress/routes/index.options.ts diff --git a/.vitepress/routes/index.options.ts b/.vitepress/routes/index.options.ts deleted file mode 100644 index 8be99cc22..000000000 --- a/.vitepress/routes/index.options.ts +++ /dev/null @@ -1,9 +0,0 @@ -export default defineEventHandler(async (event) => { - return new Response("", { - status: 200, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Methods": "POST,PATCH,OPTIONS", - }, - }); -}); diff --git a/.vitepress/routes/index.post.ts b/.vitepress/routes/index.post.ts index 3fc903050..8dd050577 100644 --- a/.vitepress/routes/index.post.ts +++ b/.vitepress/routes/index.post.ts @@ -24,8 +24,6 @@ function getFeedbackOption(value: string) { } export default defineEventHandler(async (event) => { - if (event.headers.get("sec-fetch-mode") === "cors") return sendNoContent(event, 200); - const { message, contactEmail, feedbackType } = await readBody(event); const env = useRuntimeConfig(event);