mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
better cache-control
This commit is contained in:
@@ -19,7 +19,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
return acc + curr.Size! / 1024 / 1024 / 1024
|
||||
}, 0)
|
||||
|
||||
res.setHeader('Cache-Control', 's-maxage=86400');
|
||||
res.setHeader(
|
||||
'Cache-Control',
|
||||
'public, s-maxage=10, stale-while-revalidate=59'
|
||||
)
|
||||
res.status(200).json (JSON.stringify({
|
||||
'objectCount': data.KeyCount,
|
||||
'totalSize': (Math.round(totalsize * 100) / 100)
|
||||
|
Reference in New Issue
Block a user