add cache-control to validPetPoses API
This commit is contained in:
parent
3f2f77c35d
commit
a164235c0e
1 changed files with 5 additions and 0 deletions
|
@ -2,5 +2,10 @@ import getValidPetPoses from "../src/server/getValidPetPoses";
|
|||
|
||||
export default async (req, res) => {
|
||||
const buffer = await getValidPetPoses();
|
||||
|
||||
// Cache for 1 hour. This will also cache at Vercel's CDN, so the function
|
||||
// shouldn't even get run very often at all!
|
||||
res.setHeader("Cache-Control", "max-age=3600");
|
||||
|
||||
res.status(200).send(buffer);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue