This commit is contained in:
Tben 2023-08-21 09:42:08 +01:00
parent 1f3ddaab52
commit 2b094160cd
2 changed files with 14 additions and 1 deletions

View File

@ -16,7 +16,7 @@ module.exports = {
async headers() { async headers() {
return [ return [
{ {
source: "/api/test-route", source: "/api/:path*",
headers: [ headers: [
{ key: "Access-Control-Allow-Credentials", value: "true" }, { key: "Access-Control-Allow-Credentials", value: "true" },
{ key: "Access-Control-Allow-Origin", value: "*" }, { key: "Access-Control-Allow-Origin", value: "*" },

13
vercel.json Normal file
View File

@ -0,0 +1,13 @@
{
"headers": [
{
"source": "/api/(.*)",
"headers": [
{ "key": "Access-Control-Allow-Credentials", "value": "true" },
{ "key": "Access-Control-Allow-Origin", "value": "*" },
{ "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS,PATCH,DELETE,POST,PUT" },
{ "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }
]
}
]
}