From f3351cabc421082cbdd66cfc0e37df8202941a2b Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:32:30 +0530 Subject: [PATCH] cors trial 999 --- .vitepress/routes/index.post.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vitepress/routes/index.post.ts b/.vitepress/routes/index.post.ts index 8dd050577..3fc903050 100644 --- a/.vitepress/routes/index.post.ts +++ b/.vitepress/routes/index.post.ts @@ -24,6 +24,8 @@ 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);