From a0d1bf4742710cab0fbfb326030fc870fc4083f3 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 30 Sep 2024 12:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Vercel=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + frontend/vercel.json | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 frontend/vercel.json diff --git a/.gitignore b/.gitignore index 6b306bd..b28ac53 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,4 @@ venv.bak/ .idea/ data/ log/ +.vercel diff --git a/frontend/vercel.json b/frontend/vercel.json new file mode 100644 index 0000000..9f7344d --- /dev/null +++ b/frontend/vercel.json @@ -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": "/" + } + ] +}