From 1ab65bb89850ef1da81efb824b5a3c615040b22a Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:41:37 +0530 Subject: [PATCH] try again --- .vitepress/theme/components/Feedback.vue | 2 ++ nitro.config.ts | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.vitepress/theme/components/Feedback.vue b/.vitepress/theme/components/Feedback.vue index c7b37099d..03cdfd85a 100644 --- a/.vitepress/theme/components/Feedback.vue +++ b/.vitepress/theme/components/Feedback.vue @@ -46,6 +46,8 @@ async function handleSubmit(type?: string) { const response = await fetch("https://feedback.tasky.workers.dev", { method: "POST", headers: { + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Methods": "POST", "Content-Type": "application/json", }, body: JSON.stringify(body), diff --git a/nitro.config.ts b/nitro.config.ts index e9142d01f..57159bfab 100644 --- a/nitro.config.ts +++ b/nitro.config.ts @@ -6,11 +6,7 @@ export default defineNitroConfig({ srcDir: ".vitepress", routeRules: { "/": { - cors: true, - headers: { - "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Methods": "POST", - }, + cors: false, }, }, });