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:
parent
e264447e50
commit
5b21368d7c
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue