reduce cache maxage

This commit is contained in:
spencerwooo
2022-02-10 23:06:11 +08:00
parent 2686197b4a
commit 03163e9d32
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// Set edge function caching for faster load times, check docs:
// https://vercel.com/docs/concepts/functions/edge-caching
res.setHeader('Cache-Control', 'max-age=60, s-maxage=3600, stale-while-revalidate')
res.setHeader('Cache-Control', 'max-age=0, s-maxage=600, stale-while-revalidate')
// Sometimes the path parameter is defaulted to '[...path]' which we need to handle
if (path === '[...path]') {