cors trial 5
This commit is contained in:
parent
788dc1093a
commit
693c363f73
@ -47,7 +47,7 @@ async function handleSubmit(type?: string) {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Access-Control-Allow-Origin": "*",
|
"Access-Control-Allow-Origin": "*",
|
||||||
"Access-Control-Allow-Methods": "POST,PATCH,OPTIONS",
|
"Access-Control-Allow-Methods": "POST",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
|
@ -5,6 +5,12 @@ export default defineNitroConfig({
|
|||||||
},
|
},
|
||||||
srcDir: ".vitepress",
|
srcDir: ".vitepress",
|
||||||
routeRules: {
|
routeRules: {
|
||||||
"/": { cors: false },
|
"/": {
|
||||||
|
cors: true,
|
||||||
|
headers: {
|
||||||
|
"Access-Control-Allow-Origin": "*",
|
||||||
|
"Access-Control-Allow-Methods": "POST",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user