This commit is contained in:
Travis Fischer
2021-02-06 00:40:21 -05:00
parent c07548d53f
commit 9507202507
2 changed files with 2 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ export default async (
return res.status(405).send({ error: 'method not allowed' })
}
// cache robots.txt for up to 60 seconds
res.setHeader(
'Cache-Control',
'public, s-maxage=60, max-age=60, stale-while-revalidate=60'

View File

@@ -14,6 +14,7 @@ export default async (
const siteMaps = await getSiteMaps()
// cache sitemap for up to one hour
res.setHeader(
'Cache-Control',
'public, s-maxage=3600, max-age=3600, stale-while-revalidate=3600'