Skip to content

Commit

Permalink
add cache-control header to api route (#2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMakka authored Nov 21, 2024
1 parent d31cd17 commit 37afa0d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/pages/api/prices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default async function handler(
req: NextApiRequest,
res: NextApiResponse<ResponseData>
) {
res.setHeader("Cache-Control", "public, s-maxage=60");
if (req.method !== "GET") {
return res.status(405).json({ error: "Method not allowed" });
}
Expand Down

0 comments on commit 37afa0d

Please sign in to comment.