1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 14:25:31 -04:00

update cache-control headers

This commit is contained in:
2022-06-13 20:07:12 -04:00
parent a63ea35463
commit 4e0ca9ff4d
9 changed files with 170 additions and 170 deletions

View File

@@ -53,7 +53,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const siteStats = await getSiteStats(client);
// let Vercel edge cache results for 15 mins
res.setHeader("Cache-Control", "s-maxage=900, stale-while-revalidate=60");
res.setHeader("Cache-Control", "public, max-age=0, s-maxage=900, stale-while-revalidate");
// return in JSON format
return res.status(200).json(siteStats);