mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
change cache control header (stale-while-revalidate)
This commit is contained in:
+1
-1
@@ -13,7 +13,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=0, s-maxage=600, stale-while-revalidate')
|
||||
res.setHeader('Cache-Control', apiConfig.cacheControlHeader)
|
||||
|
||||
if (typeof id === 'string') {
|
||||
const itemApi = `${apiConfig.driveApi}/items/${id}`
|
||||
|
||||
Reference in New Issue
Block a user