添加Vercel配置

This commit is contained in:
John Smith 2024-09-30 12:46:22 +08:00
parent 75938141f0
commit a0d1bf4742
2 changed files with 32 additions and 0 deletions

1
.gitignore vendored
View File

@ -107,3 +107,4 @@ venv.bak/
.idea/ .idea/
data/ data/
log/ log/
.vercel

31
frontend/vercel.json Normal file
View File

@ -0,0 +1,31 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"cleanUrls": true,
"trailingSlash": false,
"headers": [
{
"source": "/((?!api/)[^.]*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=180"
}
]
},
{
"source": "/((?!api/).+\\.\\w+)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=86400"
}
]
}
],
"rewrites": [
{
"source": "/((?!api/)[^.]+)",
"destination": "/"
}
]
}