diff --git a/.vitepress/theme/components/Feedback.vue b/.vitepress/theme/components/Feedback.vue index df6116866..03cdfd85a 100644 --- a/.vitepress/theme/components/Feedback.vue +++ b/.vitepress/theme/components/Feedback.vue @@ -47,7 +47,7 @@ async function handleSubmit(type?: string) { method: "POST", headers: { "Access-Control-Allow-Origin": "*", - "Access-Control-Allow-Methods": "POST,PATCH,OPTIONS", + "Access-Control-Allow-Methods": "POST", "Content-Type": "application/json", }, body: JSON.stringify(body), diff --git a/nitro.config.ts b/nitro.config.ts index 13990ecaa..e9142d01f 100644 --- a/nitro.config.ts +++ b/nitro.config.ts @@ -5,6 +5,12 @@ export default defineNitroConfig({ }, srcDir: ".vitepress", routeRules: { - "/": { cors: false }, + "/": { + cors: true, + headers: { + "Access-Control-Allow-Origin": "*", + "Access-Control-Allow-Methods": "POST", + }, + }, }, });