1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-23 07:44:26 -04:00

update function cache headers

This commit is contained in:
2022-01-03 11:52:32 -05:00
parent 55d9207753
commit aa40d3384c
7 changed files with 16 additions and 29 deletions

View File

@@ -21,8 +21,8 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
const { res } = context;
// https://developer.mozilla.org/en-US/docs/Web/Manifest#deploying_a_manifest
res.setHeader("content-type", "application/manifest+json");
// cache for one day
res.setHeader("content-type", "application/manifest+json; charset=utf-8");
// cache on edge for one day
res.setHeader("cache-control", "s-maxage=86400, stale-while-revalidate");
res.write(JSON.stringify(manifest));
res.end();