cors trial 5
This commit is contained in:
parent
788dc1093a
commit
693c363f73
@ -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),
|
||||
|
@ -5,6 +5,12 @@ export default defineNitroConfig({
|
||||
},
|
||||
srcDir: ".vitepress",
|
||||
routeRules: {
|
||||
"/": { cors: false },
|
||||
"/": {
|
||||
cors: true,
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "POST",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user