diff options
Diffstat (limited to 'routes/rates.ts')
| -rw-r--r-- | routes/rates.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/routes/rates.ts b/routes/rates.ts index d4426a6e..6e14da82 100644 --- a/routes/rates.ts +++ b/routes/rates.ts @@ -4,15 +4,18 @@ import { rate } from "$lib/rates"; export default { async fx(c) { const { fx } = await g("fx"); + c.header("Cache-Control", "public, max-age=300"); return c.json({ fx }); }, async last(c) { + c.header("Cache-Control", "public, max-age=30"); return c.json(rate || (await g("rate"))); }, async index(c) { const { date, fx, ...rates } = await g("rates"); + c.header("Cache-Control", "public, max-age=30"); return c.json(rates); }, }; |
