Gate analytics and cache public API requests

This commit is contained in:
2569718930@qq.com
2026-04-06 13:58:11 +08:00
parent 9be12ad1d7
commit 08d7308486
14 changed files with 114 additions and 309 deletions
+5 -2
View File
@@ -24,9 +24,12 @@ export async function GET(
try {
const auth = await buildBackendRequestHeaders(req);
const res = await fetch(url, {
const fetchOptions = {
headers: auth.headers,
cache: "no-store",
next: { revalidate: 60 },
} as const;
const res = await fetch(url, {
...fetchOptions,
});
if (!res.ok) {
const raw = await res.text();